/**
 * CV Tailoring Engine - Professional Styles
 * Color Scheme: Cream, Gold, Dark Forest Green
 * NO EMOJIS - Professional icons only
 */

:root {
    /* Brand Colors - Matching your scheme */
    --cream-primary: #FBF7F0;
    --cream-light: #FFFDF9;
    --cream-medium: #F5EFE6;
    
    --gold-primary: #C9A961;
    --gold-light: #E5D4A1;
    --gold-dark: #B8935A;
    --gold-accent: #D4B574;
    
    --forest-primary: #1A3028;
    --forest-dark: #0F1F1A;
    --forest-medium: #2B4B3F;
    --forest-light: #3D5A4C;
    
    /* Neutral Colors */
    --text-primary: #1A3028;
    --text-secondary: #4A5D54;
    --text-muted: #6B7B73;
    --border-light: rgba(201, 169, 97, 0.15);
    --border-medium: rgba(201, 169, 97, 0.25);
    
    /* Status Colors */
    --success-green: #00A878;
    --warning-amber: #F59E0B;
    --error-red: #DC2626;
    --info-blue: #0891B2;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(26, 48, 40, 0.08);
    --shadow-md: 0 4px 12px rgba(26, 48, 40, 0.12);
    --shadow-lg: 0 8px 24px rgba(26, 48, 40, 0.16);
    --shadow-xl: 0 12px 36px rgba(26, 48, 40, 0.20);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Playfair Display', Georgia, serif;
}

/* CV Tailoring Modal - Main Container */
.cv-tailoring-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 48, 40, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Content */
.cv-modal-content {
    background: var(--cream-light);
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(40px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.cv-modal-header {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-medium);
}

.cv-modal-title {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--cream-light);
}

.cv-modal-title h2 {
    font-family: var(--font-secondary);
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

/* Professional Icon */
.cv-modal-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-modal-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--cream-light);
    fill: none;
    stroke-width: 2;
}

/* Close Button */
.cv-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cv-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.cv-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--cream-light);
    stroke-width: 2.5;
}

/* Progress Steps */
.cv-progress-container {
    background: var(--cream-primary);
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-light);
}

.cv-progress-steps {
    display: flex;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.cv-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.cv-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border-light);
}

.cv-step.active:not(:last-child)::after {
    background: linear-gradient(90deg, var(--gold-primary) 0%, var(--border-light) 100%);
}

.cv-step.completed:not(:last-child)::after {
    background: var(--gold-primary);
}

.cv-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cream-light);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.cv-step.active .cv-step-circle {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
    color: var(--cream-light);
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.2);
}

.cv-step.completed .cv-step-circle {
    background: var(--forest-primary);
    border-color: var(--forest-primary);
    color: var(--cream-light);
}

.cv-step-label {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}

.cv-step.active .cv-step-label {
    color: var(--forest-primary);
    font-weight: 600;
}

.cv-step.completed .cv-step-label {
    color: var(--forest-medium);
}

/* Modal Body */
.cv-modal-body {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: var(--cream-light);
}

/* Upload Section */
.cv-upload-section {
    text-align: center;
    padding: 48px;
}

.cv-upload-area {
    background: var(--cream-primary);
    border: 2px dashed var(--border-medium);
    border-radius: 16px;
    padding: 48px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cv-upload-area:hover {
    border-color: var(--gold-primary);
    background: var(--cream-medium);
}

.cv-upload-area.dragover {
    background: var(--gold-light);
    border-color: var(--gold-primary);
    transform: scale(1.02);
}

.cv-upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: var(--gold-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-upload-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--cream-light);
    stroke-width: 2;
}

.cv-upload-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--forest-primary);
    margin-bottom: 8px;
}

.cv-upload-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.cv-upload-button {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: var(--cream-light);
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.cv-upload-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Analysis Section */
.cv-analysis-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px;
}

.cv-analysis-card {
    background: var(--cream-primary);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.cv-analysis-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.cv-analysis-card-icon {
    width: 40px;
    height: 40px;
    background: var(--gold-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-analysis-card-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--gold-dark);
    stroke-width: 2;
}

.cv-analysis-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--forest-primary);
}

/* Match Score Display */
.cv-match-score {
    text-align: center;
    padding: 32px;
}

.cv-score-circle {
    width: 180px;
    height: 180px;
    margin: 0 auto 24px;
    position: relative;
}

.cv-score-ring {
    transform: rotate(-90deg);
}

.cv-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.cv-score-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--forest-primary);
    display: block;
}

.cv-score-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Skills Grid */
.cv-skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cv-skill-tag {
    background: var(--cream-light);
    border: 1px solid var(--border-light);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.cv-skill-tag.matched {
    background: var(--gold-light);
    border-color: var(--gold-primary);
    color: var(--forest-primary);
    font-weight: 500;
}

.cv-skill-tag.missing {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--error-red);
    color: var(--error-red);
}

/* Recommendations */
.cv-recommendations {
    background: var(--cream-primary);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

.cv-recommendation-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--cream-light);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.cv-recommendation-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.cv-recommendation-priority {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.cv-recommendation-priority.high {
    background: var(--error-red);
}

.cv-recommendation-priority.medium {
    background: var(--warning-amber);
}

.cv-recommendation-priority.low {
    background: var(--success-green);
}

.cv-recommendation-content {
    flex: 1;
}

.cv-recommendation-action {
    font-weight: 600;
    color: var(--forest-primary);
    margin-bottom: 4px;
}

.cv-recommendation-details {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Export Section */
.cv-export-section {
    padding: 32px;
    text-align: center;
}

.cv-export-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto 32px;
}

.cv-export-option {
    background: var(--cream-primary);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cv-export-option:hover {
    border-color: var(--gold-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.cv-export-option.selected {
    background: var(--gold-light);
    border-color: var(--gold-primary);
}

.cv-export-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: var(--cream-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-export-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--forest-primary);
    stroke-width: 2;
}

.cv-export-label {
    font-weight: 600;
    color: var(--forest-primary);
    margin-bottom: 4px;
}

.cv-export-description {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Action Buttons */
.cv-modal-footer {
    background: var(--cream-primary);
    padding: 24px 32px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cv-footer-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.cv-footer-actions {
    display: flex;
    gap: 12px;
}

.cv-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cv-btn-secondary {
    background: var(--cream-light);
    color: var(--text-primary);
    border: 2px solid var(--border-medium);
}

.cv-btn-secondary:hover {
    background: var(--cream-medium);
    border-color: var(--gold-primary);
}

.cv-btn-primary {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: var(--cream-light);
    box-shadow: var(--shadow-md);
}

.cv-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cv-btn-success {
    background: linear-gradient(135deg, var(--forest-primary) 0%, var(--forest-dark) 100%);
    color: var(--cream-light);
    box-shadow: var(--shadow-md);
}

.cv-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Loading State */
.cv-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.cv-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-light);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.cv-loading-text {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Success State */
.cv-success-message {
    text-align: center;
    padding: 48px;
}

.cv-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--success-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPulse 0.5s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.cv-success-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
    stroke-width: 3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cv-modal-content {
        width: 95%;
        height: 90vh;
        border-radius: 16px;
    }
    
    .cv-modal-header {
        padding: 20px;
    }
    
    .cv-modal-title h2 {
        font-size: 22px;
    }
    
    .cv-analysis-section {
        grid-template-columns: 1fr;
    }
    
    .cv-export-options {
        grid-template-columns: 1fr;
    }
    
    .cv-progress-steps {
        padding: 0 20px;
    }
    
    .cv-step-label {
        font-size: 11px;
    }
}

/* Utility Classes */
.cv-text-forest { color: var(--forest-primary); }
.cv-text-gold { color: var(--gold-primary); }
.cv-text-muted { color: var(--text-muted); }
.cv-bg-cream { background: var(--cream-primary); }
.cv-bg-gold { background: var(--gold-primary); }
.cv-mt-1 { margin-top: 8px; }
.cv-mt-2 { margin-top: 16px; }
.cv-mt-3 { margin-top: 24px; }
.cv-mb-1 { margin-bottom: 8px; }
.cv-mb-2 { margin-bottom: 16px; }
.cv-mb-3 { margin-bottom: 24px; }