/* Books Module - Edit Advanced Page Styles */

.edit-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-top: 5px solid #8b4513;
}

.book-info-section {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
}

.select2-container--default .select2-selection--multiple {
    border-radius: 12px !important;
    border: 1px solid #dee2e6 !important;
    min-height: 50px !important;
    padding: 8px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #8b4513 !important;
    border: none !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 5px 12px !important;
    margin: 3px !important;
    font-size: 0.95rem !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white !important;
    margin-right: 5px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ff6b6b !important;
}

/* Theme-Specific Styles */

/* Light Theme */
.theme-indigo-light .edit-card {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
}

.theme-indigo-light .book-info-section {
    border-bottom: 2px solid #e9ecef !important;
}

.theme-indigo-light .book-info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.theme-indigo-light .book-info-card h4,
.theme-indigo-light .book-info-card .fw-semibold {
    color: #212529 !important;
}

.theme-indigo-light .book-info-card .text-muted {
    color: #6c757d !important;
}

.theme-indigo-light .book-info-card p.text-muted {
    color: #6c757d !important;
}

.theme-indigo-light #platformTrackingSection .platform-row:hover {
    background: #f0f0f0 !important;
}

.theme-indigo-light #currentCoverPreview {
    border-color: #dee2e6;
    background: #f8f9fa;
}

.theme-indigo-light .gallery-item {
    background: #fff;
}

/* Dark Theme */
.theme-indigo-dark .edit-card {
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.theme-indigo-dark .book-info-section {
    border-bottom: 2px solid rgba(139, 92, 246, 0.3) !important;
}

.theme-indigo-dark .book-info-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(30, 41, 59, 0.8) 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.theme-indigo-dark .book-info-card h4,
.theme-indigo-dark .book-info-card .fw-semibold {
    color: #e2e8f0 !important;
}

.theme-indigo-dark .book-info-card .text-muted {
    color: #94a3b8 !important;
}

.theme-indigo-dark .book-info-card p.text-muted {
    color: #cbd5e1 !important;
}

.theme-indigo-dark #platformTrackingSection .platform-row {
    background: rgba(30, 41, 59, 0.4) !important;
}

.theme-indigo-dark #platformTrackingSection .platform-row:hover {
    background: rgba(139, 92, 246, 0.15) !important;
}

.theme-indigo-dark #currentCoverPreview {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(30, 41, 59, 0.6);
}

.theme-indigo-dark .gallery-item {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.theme-indigo-dark .upload-progress {
    background: rgba(30, 41, 59, 0.6) !important;
}

.theme-indigo-dark .upload-progress-bar {
    background: rgba(139, 92, 246, 0.2);
}

/* Light Theme */
.theme-indigo-light .situation-card {
    background: white !important;
}

/* Form Elements Dark Theme */
.theme-indigo-dark .situation-card {
    background: rgba(30, 41, 59, 0.6) !important;
    border: 2px solid rgba(139, 92, 246, 0.4) !important;
}

.theme-indigo-dark .situation-radio-option input[type="radio"]:checked + .situation-card {
    background: rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.3);
}

.theme-indigo-dark .form-label,
.theme-indigo-dark .section-title {
    color: #e2e8f0 !important;
}

.theme-indigo-dark .text-dark {
    color: #e2e8f0 !important;
}

.theme-indigo-dark .form-select,
.theme-indigo-dark .form-control {
    background-color: rgba(30, 41, 59, 0.8) !important;
    color: #e2e8f0 !important;
    border-color: rgba(139, 92, 246, 0.3);
}

.theme-indigo-dark .form-select:focus,
.theme-indigo-dark .form-control:focus {
    background-color: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(139, 92, 246, 0.6);
    color: #e2e8f0 !important;
}

.theme-indigo-dark .form-control:disabled,
.theme-indigo-dark .form-control[readonly] {
    background-color: rgba(30, 41, 59, 0.6) !important;
    color: #94a3b8 !important;
}

.theme-indigo-dark .form-select option {
    background-color: #1e293b;
    color: #e2e8f0;
}

.theme-indigo-dark #score {
    color: #e2e8f0 !important;
}

.theme-indigo-dark .text-muted {
    color: #94a3b8 !important;
}

.theme-indigo-dark .favorite-section {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 193, 7, 0.15)) !important;
}

.theme-indigo-dark .favorite-section:hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.25), rgba(255, 193, 7, 0.25)) !important;
}

/* Select2 Dark Theme Styles */
.theme-indigo-dark .select2-container--default .select2-selection--multiple {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}

.theme-indigo-dark .select2-container--default .select2-selection--multiple .select2-search__field {
    color: #e2e8f0 !important;
}

.theme-indigo-dark .select2-container--default .select2-selection--multiple .select2-search__field::placeholder {
    color: #94a3b8 !important;
}

.theme-indigo-dark .select2-dropdown {
    background-color: #1e293b !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}

.theme-indigo-dark .select2-results__option {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
}

.theme-indigo-dark .select2-results__option--highlighted {
    background-color: rgba(139, 92, 246, 0.3) !important;
}

.theme-indigo-dark .select2-results__option--selected {
    background-color: rgba(139, 92, 246, 0.2) !important;
}

.theme-indigo-dark .select2-search--dropdown .select2-search__field {
    background-color: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    color: #e2e8f0 !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* Remove container padding for full-width on mobile */
    .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }
    
    /* Reduce padding on mobile */
    .edit-card {
        padding: 1rem !important;
        border-radius: 0 !important;
    }
    
    /* Add spacing between form fields on mobile */
    .form-control, .form-select {
        margin-bottom: 1rem !important;
    }
    
    /* Situation cards - one per line on mobile */
    .situation-radio-group {
        flex-direction: column !important;
    }
    
    .situation-radio-option {
        min-width: 100% !important;
        flex: none !important;
    }
    
    /* Fix image breaking on mobile */
    .book-info-section .col-12.text-center img,
    .book-placeholder {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* Release Date - Stack label and value */
    .book-info-card .text-end {
        text-align: left !important;
        margin-top: 1rem;
        width: 100%;
    }
    
    .book-info-card .d-flex.align-items-center.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    /* Recommendation buttons - stack vertically */
    .rating-options {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .rating-option {
        width: 100% !important;
    }
    
    .rating-option label {
        width: 100% !important;
    }
    
    /* Action buttons - stack vertically with same width */
    .d-flex.justify-content-between.align-items-center.mt-5 {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
    }
    
    .d-flex.justify-content-between.align-items-center.mt-5 > * {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .d-flex.justify-content-between.align-items-center.mt-5 .btn {
        width: 100% !important;
    }
}
