/* ============================================
   AI Interview Questions Modal Styling
   ============================================ */

/* Modal Custom Sizing */
.modal-xl {
    max-width: 1200px;
}

/* Question Card Styling */
.question-card {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.question-card:hover {
    border-color: #6366f1;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.question-card .card-header {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-bottom: 2px solid #e5e7eb;
    padding: 1.25rem;
}

.question-card .card-body {
    padding: 1.5rem;
    background-color: #ffffff;
}

/* Question Number Badge */
.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 50%;
    margin-right: 1rem;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

/* Question Text */
.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Category & Difficulty Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-primary {
    background-color: #6366f1 !important;
}

.bg-info {
    background-color: #3b82f6 !important;
}

.bg-success {
    background-color: #10b981 !important;
}

.bg-warning {
    background-color: #f59e0b !important;
    color: #78350f !important;
}

.bg-danger {
    background-color: #ef4444 !important;
}

.bg-secondary {
    background-color: #6b7280 !important;
}

/* Ideal Answer Section */
.ideal-answer {
    background-color: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #1e40af;
}

/* Flag Lists */
.flag-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.flag-list li {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    padding-left: 2rem;
}

.flag-list li::before {
    position: absolute;
    left: 0.75rem;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.875rem;
}

/* Green Flags */
.green-flags li {
    background-color: #d1fae5;
    border-left: 3px solid #10b981;
    color: #065f46;
}

.green-flags li::before {
    content: "\f00c"; /* fa-check */
    color: #10b981;
}

/* Red Flags */
.red-flags li {
    background-color: #fee2e2;
    border-left: 3px solid #ef4444;
    color: #991b1b;
}

.red-flags li::before {
    content: "\f071"; /* fa-exclamation-triangle */
    color: #ef4444;
}

/* Follow-up Questions */
ol {
    padding-left: 1.5rem;
}

ol li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    line-height: 1.6;
    color: #374151;
}

/* Section Headers */
h6.text-primary {
    color: #6366f1 !important;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

h6.text-info {
    color: #3b82f6 !important;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

h6.text-success {
    color: #10b981 !important;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

h6.text-danger {
    color: #ef4444 !important;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

/* Modal Header */
.modal-header.bg-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-bottom: none;
}

.modal-header .modal-title {
    font-weight: 700;
    font-size: 1.25rem;
}

/* Modal Footer */
.modal-footer {
    background-color: #f9fafb;
    border-top: 2px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.btn-outline-primary {
    border-color: #6366f1;
    color: #6366f1;
}

.btn-outline-primary:hover {
    background-color: #6366f1;
    color: white;
}

.btn-outline-info {
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn-outline-info:hover {
    background-color: #3b82f6;
    color: white;
}

.btn-outline-secondary {
    border-color: #6b7280;
    color: #6b7280;
}

.btn-outline-secondary:hover {
    background-color: #6b7280;
    color: white;
}

/* Loading State */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15rem;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

/* Questions Summary */
.alert-info .row {
    align-items: center;
}

.alert-info h6 {
    color: #1e40af;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Collapse Animation */
.card-body {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Modal Animation */
.modal.show {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal.show .modal-dialog {
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-xl {
        max-width: 95%;
        margin: 0.5rem;
    }

    .question-card .card-header {
        padding: 1rem;
    }

    .question-card .card-body {
        padding: 1rem;
    }

    .question-number {
        width: 30px;
        height: 30px;
        font-size: 0.875rem;
        margin-right: 0.75rem;
    }

    .question-text {
        font-size: 1rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .flag-list li {
        font-size: 0.85rem;
        padding: 0.5rem;
        padding-left: 1.75rem;
    }

    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .modal-header,
    .modal-footer,
    .btn {
        display: none;
    }

    .question-card {
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }

    .question-card .card-header {
        background: #f0f0f0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Scrollbar Styling for Modal */
.modal-dialog-scrollable .modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 10px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb:hover {
    background: #4f46e5;
}
