/* ============================================================================
   CANDIDATE MODAL STYLES
   ============================================================================
   
   Description:
   Redesigned candidate review modal with improved UX following these principles:
   - Lead with the Verdict (score banner at top)
   - Two-Column Layout (static info left, decision content right)
   - Collapsible Warning Content (accordion for red flags/missing fields)
   - Spatial Separation for Destructive Actions (footer hierarchy)
   - Confirmation Gates for Destructive Actions
   
   Dependencies:
   - Requires: base.css (variables and reset)
   
   Sections:
   1. Modal Container & Structure
   2. Verdict Banner
   3. Modal Header
   4. Two-Column Layout
   5. AI Summary Section
   6. Collapsible Accordions
   7. TA Assist Panel
   8. Notes Section
   9. Footer Hierarchy
   10. Confirmation Modal
   11. Animations & States
   
   ============================================================================ */

/* ============================================================================
   1. MODAL CONTAINER & STRUCTURE
   ============================================================================ */

.candidate-modal .modal-content.modal-candidate {
    max-width: 1100px;
    width: 95%;
    /* max-height: 80vh; */
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

/* ============================================================================
   2. VERDICT BANNER
   ============================================================================ */

.verdict-banner {
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: relative;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.verdict-banner.strong-yes {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.verdict-banner.yes {
    background: linear-gradient(355deg, #10B981 0%, #65cb0a 100%);
}

.verdict-banner.maybe {
    background: linear-gradient(90deg, #F59E0B 0%, #D97706 100%);
}

.verdict-banner.no {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.verdict-banner.strong-no {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
}

.verdict-banner.unknown {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
}

.verdict-score {
    display: flex;
    flex-direction: column;
    padding: 20px 24px 16px 0;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    gap: 4px;
}

.verdict-score .score-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.verdict-score .score-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.verdict-recommendation {
    display: flex;
    flex-direction: column;
    padding: 20px 24px 16px;
    gap: 2px;
}

.verdict-recommendation .recommendation-value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 600;
    color: #fff;
}

.verdict-recommendation .recommendation-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.verdict-banner .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
}

.verdict-banner .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* ============================================================================
   3. MODAL HEADER
   ============================================================================ */

.candidate-modal .modal-header {
    padding: 0 0 0 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-card);
}

.candidate-header-info {
    display: flex;
    width: 100%;
    gap: 16px;
}

.candidate-header-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    width: 100%;
    padding: 16px 0;
    line-height: 1;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.position-tag {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background-color: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: var(--border-radius);
}

.candidate-modal .btn-menu {
    height: 56px;
}

/* ============================================================================
   4. TWO-COLUMN LAYOUT
   ============================================================================ */

.candidate-modal .modal-body {
    padding: 0;
}

.modal-two-columns {
    display: flex;
    gap: 0;
    flex: 1;
    overflow: hidden;
}

.candidate-modal .modal-column {
    padding: 24px;
    overflow-y: auto;
}

.candidate-modal .detail-section svg {
    width: 24px;
}

.column-static {
    flex: 0 0 380px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
}

.candidate-modal .column-decision {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.column-decision {
    flex: 1;
    background-color: var(--bg-card);
}

/* Detail Sections */
.candidate-modal .detail-section:last-child {
    margin-bottom: 0;
}

.candidate-modal p.details {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    max-width: 60ch;
}

.candidate-modal .detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.candidate-modal .detail-list {
    margin-bottom: 16px;
    gap: 1rem;
    display: flex;
    flex-direction: column;
}

.candidate-modal .detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.candidate-modal .detail-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.candidate-modal .detail-value {
    color: var(--text-primary);
    line-height: 1.45;
}

.candidate-modal .detail-value.-large {
    font-size: 1.1rem
}

/* Document Links */
.document-links {
    display: flex;
    margin-left: auto;
}

.document-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background-color: var(--primary);
    border-radius: 0;    
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.document-link:hover {
    background-color: var(--primary-light);
    color: var(--primary)
}

.document-link svg {
    width: 16px;
    height: 16px;
}

.no-document {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Action Buttons Section */
.action-buttons {
    display: flex;
    gap: 8px;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ============================================================================
   5. AI SUMMARY SECTION
   ============================================================================ */

.ai-summary-section {
    padding-top: 8px;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.ai-summary-section h3 {
    color: var(--text-secondary);
}

.ai-summary-content {
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* ============================================================================
   6. MODAL TABS
   ============================================================================ */

.modal-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    background-color: var(--bg-secondary);
    flex-wrap: wrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
}

.modal-tab {
    flex-grow: 1;
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    border-left: 1px solid var(--bg-tertiary);
}

.modal-tab:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    border-bottom-color: var(--primary);
}

.modal-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: transparent;
}

.modal-tab.tab-danger {
    color: var(--danger);
}

.modal-tab.tab-danger:hover {
    color: var(--danger);
    background-color: var(--danger-light);
    border-bottom-color: var(--danger);
}

.modal-tab.tab-danger.active {
    color: var(--danger);
    border-bottom-color: var(--danger);
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 6px;
    background-color: var(--text-muted);
    color: #fff;
    margin-left: auto;
}

.tab-badge.danger {
    background-color: var(--danger);
}

.tab-badge.success {
    background-color: var(--primary);
}

.modal-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    min-height: 0;
}

    .modal-tab-content.notes { padding: 0; }

        .modal-tab-content.notes .tab-pane { height: 100%; }


.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Warning List (used in tabs) */
.warning-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.warning-list li {
    padding: 10px 0;
    font-size: 1rem;
    color: var(--danger);
    padding-left: 24px;
    position: relative;
    max-width: 60ch;
}
    .warning-list li::before {
        content:'';
        width: 12px;
        height: 2px;
        background: var(--danger);
        position: absolute;
        margin-top: 11px;
        left: 0px;
    }

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

/* Strengths List */
.strengths-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.strengths-list li {
    padding: 10px 0;
    padding-left: 24px;
    position: relative;
    font-size: 1rem;
    max-width: 60ch;
}

.strengths-list li::before {
    content: '';
    width: 12px;
    height: 2px;
    background: var(--text-secondary);
    opacity: .5;
    position: absolute;
    margin-top: 11px;
    left: 0px;
}

/* Reasoning List */
.reasoning-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reasoning-list li {
    padding: 10px 0;
    padding-left: 24px;
    position: relative;
    font-size: 1rem;
    color: var(--text-primary);
    max-width: 60ch;
}

.reasoning-list li::before {
    content: '';
    width: 12px;
    height: 2px;
    background: var(--text-muted);
    position: absolute;
    margin-top: 11px;
    left: 0px;
}

/* ============================================================================
   7. TA ASSIST PANEL
   ============================================================================ */

.ta-assist-section {
    margin-top: auto;
}

.ta-assist-section .ta-assist-panel {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    border-radius: var(--border-radius);
    padding: 20px;
    color: #fff;
}

.ta-assist-section .ta-assist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ta-assist-section .ta-assist-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ta-assist-section .ta-assist-header h3 svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.ta-assist-section .btn-generate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ta-assist-section .btn-generate:hover {
    background: rgba(255, 255, 255, 0.25);
}

.ta-assist-section .btn-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ta-assist-section .ta-assist-content {
    font-size: 0.875rem;
    line-height: 1.6;
}

.ta-assist-section .question-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 12px;
    margin-bottom: 10px;
}

.ta-assist-section .question-item:last-child {
    margin-bottom: 0;
}

.ta-assist-section .question-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.ta-assist-section .question-text {
    color: #fff;
}

.ta-assist-section .ta-assist-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 24px;
    color: rgba(255, 255, 255, 0.6);
}

.ta-assist-section .ta-assist-placeholder svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

.ta-assist-section .ta-assist-placeholder p {
    margin: 0;
    font-size: 0.875rem;
}

/* ============================================================================
   8. NOTES SECTION
   ============================================================================ */

.notes-section {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 12px 16px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.notes-header h3 {
    margin-bottom: 0 !important;
}

.save-indicator {
    position: absolute;
    bottom: 80px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: var(--success);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    pointer-events: none;
    z-index: 10;
}

.save-indicator.saved {
    opacity: 1;
    transform: translateY(0);
}

.save-indicator svg {
    width: 18px;
    height: 18px;
}

.spinner-icon {
    animation: spin 1s linear infinite;
}

/* Notes Textarea */
.notes-section .notes-textarea {
    width: 100%;
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 0;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    background-color: #fff;
    resize: none;
    line-height: 1.5;
    height: 100%;
}

.notes-section .notes-textarea:focus {
    outline: none;
}

/* Floating Save Button */
.btn-save-floating {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: 32px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-fast);
    z-index: 5;
}

.btn-save-floating:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-save-floating:active {
    transform: translateY(0);
}

.btn-save-floating svg {
    width: 18px;
    height: 18px;
}

/* ============================================================================
   9. FOOTER HIERARCHY
   ============================================================================ */

.modal-footer-redesigned {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.footer-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
}

.footer-row.primary-actions {
    border-bottom: 1px solid var(--border-color);
    justify-content: center;
}

.footer-row.secondary-actions {
    gap: 8px;
}

.footer-left,
.footer-right {
    display: flex;
    gap: 12px;
}

/* Button Styles */
.candidate-modal .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
}

.candidate-modal .btn svg {
    width: 16px;
    height: 16px;
}

.candidate-modal .btn-primary {
    background-color: #10B981;
    color: #fff;
}

.candidate-modal .btn-primary:hover {
    background-color: #059669;
}

.candidate-modal .btn-destructive {
    background-color: var(--danger-light);
    color: #DC2626;
}

.candidate-modal .btn-destructive:hover {
    background-color: #DC2626;
    color: #fff;
}

.candidate-modal .btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.candidate-modal .btn-secondary:hover {
    background-color: var(--bg-card);
    border-color: var(--text-muted);
}

.candidate-modal .btn-text {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}

.candidate-modal .btn-text:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.candidate-modal .btn-text.btn-danger {
    color: var(--danger);
}

.candidate-modal .btn-text.btn-danger:hover {
    background-color: var(--danger-light);
}

.candidate-modal .btn-text.btn-save {
    color: var(--primary);
}

.candidate-modal .btn-text.btn-save:hover {
    background-color: var(--primary-light);
}

.candidate-modal .btn-danger {
    background-color: var(--danger);
    color: #fff;
}

.candidate-modal .btn-danger:hover {
    background-color: #DC2626;
}

.candidate-modal .btn-warning {
    background-color: var(--warning);
    color: #fff;
}

.candidate-modal .btn-warning:hover {
    background-color: #D97706;
}

/* ============================================================================
   10. CONFIRMATION MODAL
   ============================================================================ */

.confirmation-modal .modal-content.modal-confirm {
    max-width: 420px;
    padding: 32px;
    text-align: center;
}

.confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background-color: var(--warning-light);
}

.confirm-icon.danger {
    background-color: var(--danger-light);
}

.confirm-icon svg {
    width: 32px;
    height: 32px;
    color: var(--warning);
}

.confirm-icon.danger svg {
    color: var(--danger);
}

.confirm-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.confirm-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.confirm-message strong {
    color: var(--text-primary);
    font-weight: 600;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* ============================================================================
   11. ANIMATIONS & STATES
   ============================================================================ */

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .modal-two-columns {
        flex-direction: column;
    }
    
    .column-static {
        flex: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .candidate-modal .modal-column {
        max-height: none;
    }
    
    .verdict-banner {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .verdict-divider {
        display: none;
    }
    
    .footer-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .footer-row.secondary-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}
