/* Modern Create Post Page - Complete Redesign */

/* ============================================
   Container & Layout
   ============================================ */
.post-create-wrapper {
    min-height: 100vh;
    padding: 2rem 0 4rem;
}

.post-create-container {
    max-width: 1200px;
    margin: 0 auto;
}

.post-create-main {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.post-create-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.post-create-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    flex-flow: wrap;
    align-items: center;
    gap: 0.75rem;
}

.post-create-title i {
    color: #7A1F1F;
    font-size: 1.5rem;
}

/* ============================================
   Form Sections
   ============================================ */
.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #7A1F1F;
}

.section-title i {
    color: #7A1F1F;
    font-size: 1.125rem;
}

/* ============================================
   Form Fields
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-label .required {
    color: #dc3545;
    margin-left: 0.25rem;
}

.form-control,
.form-select,
.select2-container .select2-selection--single {
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #333;
}

.form-control:focus,
.form-select:focus,
.select2-container--focus .select2-selection--single {
    border-color: #7A1F1F;
    box-shadow: 0 0 0 4px rgba(122, 31, 31, 0.1);
    outline: none;
}

.form-text {
    font-size: 0.8125rem;
    color: #374151;
    margin-top: 0.5rem;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.8125rem;
    margin-top: 0.5rem;
}

/* ============================================
   Category Selection
   ============================================ */
#catsContainer {
    min-height: 48px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#catsContainer:hover {
    border-color: #7A1F1F;
    background: #f8f9fa;
}

.modal-cat-link {
    color: #7A1F1F;
    text-decoration: none;
    font-weight: 500;
    width: 100%;
}

.modal-cat-link:hover {
    color: #5a1515;
}

/* ============================================
   Category Modal Improvements
   ============================================ */
.category-breadcrumb {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.category-back-btn {
    border-color: #7A1F1F;
    color: #7A1F1F;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-back-btn:hover {
    background-color: #7A1F1F;
    border-color: #7A1F1F;
    color: #ffffff;
    transform: translateX(-2px);
}

.category-breadcrumb .breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.category-breadcrumb .breadcrumb-item {
    font-size: 0.875rem;
}

.category-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    font-weight: 600;
    padding: 0 0.5rem;
}

.category-breadcrumb .breadcrumb {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-breadcrumb .breadcrumb::-webkit-scrollbar {
    display: none;
}

.category-breadcrumb .breadcrumb-item a {
    color: #7A1F1F;
    transition: color 0.2s ease;
}

.category-breadcrumb .breadcrumb-item a:hover {
    color: #5a1515;
    text-decoration: underline;
}

.category-breadcrumb .breadcrumb-item.active .text-muted {
    color: #6c757d !important;
}

/* Category Cards */
.category-card {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.category-card:hover:not(.category-card-disabled) {
    border-color: #7A1F1F;
    box-shadow: 0 4px 12px rgba(122, 31, 31, 0.15);
    transform: translateY(-2px);
}

.category-card-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.category-card-link {
    color: inherit;
}

.category-card-link:hover {
    color: inherit;
}

.category-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

.category-icon {
    font-size: 2.25rem;
    color: #7A1F1F;
    transition: transform 0.3s ease, color 0.3s ease;
}

.category-card:hover:not(.category-card-disabled) .category-icon {
    transform: scale(1.1);
    color: #5a1515;
}

.category-name {
    color: #333;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.category-card:hover:not(.category-card-disabled) .category-name {
    color: #7A1F1F;
}

.category-image {
    width: 100%;
    max-width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Modal improvements */
#browseCategories .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

#browseCategories .modal-header {
    border-bottom: 2px solid #f0f0f0;
    padding: 1rem 1.25rem;
}

#browseCategories .modal-title {
    color: #333;
    font-size: 1.25rem;
}

#browseCategories .modal-body {
    padding: 1rem 1.25rem;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

#browseCategories .modal-body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Category List View */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.category-list-item {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.category-list-item:hover:not(.category-list-item-disabled) {
    border-color: #7A1F1F;
    box-shadow: 0 2px 8px rgba(122, 31, 31, 0.12);
    transform: translateX(4px);
}

.category-list-item-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.category-list-link {
    padding: 0.75rem 1rem;
    color: #333;
    transition: all 0.3s ease;
}

.category-list-link:hover {
    color: #7A1F1F;
}

.category-list-icon {
    font-size: 1.25rem;
    color: #7A1F1F;
    min-width: 24px;
    text-align: center;
    transition: color 0.3s ease;
}

.category-list-item:hover:not(.category-list-item-disabled) .category-list-icon {
    color: #5a1515;
}

.category-list-name {
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.category-list-item:hover:not(.category-list-item-disabled) .category-list-name {
    color: #7A1F1F;
}

.category-list-arrow {
    color: #adb5bd;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.category-list-item:hover:not(.category-list-item-disabled) .category-list-arrow {
    color: #7A1F1F;
    transform: translateX(4px);
}

/* ============================================
   Radio Buttons (Post Type)
   ============================================ */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid #d0d0d0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: #7A1F1F;
    border-color: #7A1F1F;
}

.form-check-label {
    margin-left: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: #333;
}

/* ============================================
   WYSIWYG Editor
   ============================================ */
.note-editor {
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.note-editor.note-frame .note-editing-area .note-editable {
    padding: 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    min-height: 300px;
}

/* ============================================
   Price Input
   ============================================ */
.input-group {
    position: relative;
}

.input-group-text {
    background: #f8f9fa;
    border: 1.5px solid #e0e0e0;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 0.75rem 1rem;
    color: #374151;
    font-weight: 500;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.input-group .form-control:focus {
    border-left: 1.5px solid #7A1F1F;
}

/* ============================================
   Checkboxes
   ============================================ */
.form-check {
    margin-bottom: 0.75rem;
}

.form-check-input[type="checkbox"] {
    border-radius: 4px;
}

.form-check-label {
    font-size: 0.9375rem;
    color: #555;
}

/* ============================================
   Buttons
   ============================================ */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

/* Scoped to post-create content only so navbar buttons keep their normal height */
.post-create-wrapper .btn {
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    min-height: 48px;
}

.post-create-wrapper .btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.post-create-wrapper .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.post-create-wrapper .btn-primary {
    background: linear-gradient(to bottom, #6b1c21 0%, #431918 100%);
    color: #ffffff;
}

.post-create-wrapper .btn-primary:hover {
    background: linear-gradient(to bottom, #7a1f1f 0%, #5a1a18 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(122, 31, 31, 0.35);
}

.post-create-wrapper .btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.0625rem;
}

/* ============================================
   Right Sidebar
   ============================================ */
.reg-sidebar {
    margin-top: 0;
}

.sidebar-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.sidebar-card-header {
    background: linear-gradient(to bottom, #6b1c21 0%, #431918 100%);
    color: #ffffff;
    padding: 1rem 1.25rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.sidebar-card-body {
    padding: 1rem;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    padding: 0.75rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list i {
    color: #28a745;
    font-size: 1.125rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.sidebar-list span {
    color: #555;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.sidebar-intro {
    text-align: center;
    padding: 2rem 1rem;
}

.sidebar-intro i {
    font-size: 4rem;
    color: #581b1d;
    margin-bottom: 1rem;
}

.sidebar-intro h5 {
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.sidebar-intro p {
    color: #374151;
    font-size: 0.9375rem;
    margin: 0;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 991.98px) {
    .post-create-wrapper {
        padding: 1.5rem 0 3rem;
    }
    
    .post-create-main {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .post-create-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.125rem;
        padding: 0.625rem 0.875rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .post-create-wrapper .btn {
        width: 100%;
    }
    
    .reg-sidebar {
        margin-top: 2rem;
    }
}

@media (max-width: 767.98px) {
    .post-create-wrapper {
        padding: 1rem 0 2rem;
    }
    
    .post-create-main {
        padding: 1.25rem;
        border-radius: 10px;
    }
    
    .post-create-title {
        font-size: 1.25rem;
        /* flex-direction: column;
        align-items: flex-start; */
        gap: 0.5rem;
    }
    
    .section-title {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-control,
    .form-select {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
    
    .post-create-wrapper .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .post-create-wrapper .btn-lg {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .sidebar-card-body {
        padding: 1.25rem;
    }
    
    .sidebar-intro {
        padding: 1.5rem 1rem;
    }
    
    .sidebar-intro i {
        font-size: 3rem;
    }
}

/* ============================================
   Select2 Customization
   ============================================ */
.select2-container--default .select2-selection--single {
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 8px !important;
    height: 48px !important;
    padding: 0.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 2.5 !important;
    padding-left: 0.5rem;
    color: #333;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
    right: 0.5rem;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #7A1F1F !important;
    box-shadow: 0 0 0 4px rgba(122, 31, 31, 0.1) !important;
}

.select2-dropdown {
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

/* ============================================
   File Input
   ============================================ */
.file-input-wrapper {
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: #fafafa;
    transition: all 0.2s ease;
}

.file-input-wrapper:hover {
    border-color: #7A1F1F;
    background: #f8f9fa;
}

/* ============================================
   Tags Input
   ============================================ */
.select2-container--default .select2-selection--multiple {
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 8px !important;
    min-height: 48px !important;
    padding: 0.25rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #7A1F1F !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 0.25rem 0.5rem !important;
    margin: 0.25rem !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #ffffff !important;
    margin-right: 0.5rem;
}


.file-preview .fileinput-remove{
    top: .5rem !important;
    right: .5rem !important;
}
.krajee-default.file-preview-frame .file-footer-buttons .btn{
    min-height: auto !important;
}