/**
 * Ultimate CV AI-Powered Styling
 * Theme Colors: Cream, Navy Blue, Dark Forest Green, Gold Gradient
 * Color Palette:
 * - Cream: #FFF8F3
 * - Navy Blue: #1B3A57
 * - Dark Forest Green: #2D4A3E
 * - Gold Gradient: linear-gradient(135deg, #B08D57 0%, #CB997E 100%)
 */

/* AI Badge and Indicators */
.ai-badge {
    background: linear-gradient(135deg, #B08D57 0%, #CB997E 100%);
    color: #FFF8F3;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(176, 141, 87, 0.3);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { opacity: 0.9; }
    50% { opacity: 1; }
    100% { opacity: 0.9; }
}

/* AI Processing Header */
.ai-processing-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #FFF8F3;
}

/* Processing Modal Updates */
.sffc-processing-content {
    padding: 30px;
    text-align: center;
}

.processing-message {
    color: #1B3A57;
    font-size: 16px;
    font-weight: 500;
    margin: 20px 0;
    min-height: 24px;
}

/* Progress Bar */
.progress-container {
    margin-top: 25px;
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #FFF8F3;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(27, 58, 87, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #B08D57 0%, #CB997E 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 8px rgba(176, 141, 87, 0.3);
}

.progress-percent {
    position: absolute;
    right: 0;
    top: -25px;
    color: #2D4A3E;
    font-weight: 600;
    font-size: 14px;
}

/* Enhanced Processing Spinner */
.processing-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #FFF8F3;
    border-top: 4px solid #B08D57;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* AI Toggle Switch */
.ai-toggle {
    display: flex;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: #FFF8F3;
    border-radius: 10px;
    border: 1px solid #2D4A3E;
}

.ai-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 56px;
    height: 28px;
    background: #2D4A3E;
    border-radius: 28px;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
    margin-right: 15px;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #FFF8F3;
    border-radius: 50%;
    transition: 0.3s;
}

.ai-toggle input:checked + .toggle-slider {
    background: linear-gradient(135deg, #B08D57 0%, #CB997E 100%);
}

.ai-toggle input:checked + .toggle-slider::after {
    transform: translateX(28px);
}

.toggle-label {
    color: #1B3A57;
    font-weight: 500;
    flex: 1;
}

.ai-info {
    background: #FFF8F3;
    color: #2D4A3E;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 14px;
    border-left: 4px solid #B08D57;
}

/* AI Insights Section */
.ai-insights-section {
    background: linear-gradient(135deg, rgba(255, 248, 243, 0.5), rgba(255, 248, 243, 0.3));
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border: 1px solid rgba(176, 141, 87, 0.2);
}

.ai-insights-section h3 {
    color: #1B3A57;
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.insight-card {
    background: #FFFFFF;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(27, 58, 87, 0.1);
    border-top: 3px solid #2D4A3E;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(27, 58, 87, 0.15);
}

.insight-card h4 {
    color: #2D4A3E;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

.insight-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insight-card li {
    color: #1B3A57;
    font-size: 14px;
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.insight-card li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #B08D57;
    font-weight: bold;
}

/* Enhanced Results Modal */
.sffc-modal-content.sffc-modal-large {
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: #FFFFFF;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(27, 58, 87, 0.2);
}

.sffc-modal-header {
    background: linear-gradient(135deg, #1B3A57 0%, #2D4A3E 100%);
    color: #FFF8F3;
    padding: 25px 30px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sffc-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.ultimate-cv-modal-close {
    color: #FFF8F3;
    font-size: 28px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.ultimate-cv-modal-close:hover {
    opacity: 0.7;
}

/* Match Score Circle */
.match-score {
    text-align: center;
    margin: 20px 0;
}

.score-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background: linear-gradient(135deg, #B08D57 0%, #CB997E 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(176, 141, 87, 0.3);
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    z-index: 0;
}

.score-number {
    font-size: 32px;
    font-weight: bold;
    color: #1B3A57;
    position: relative;
    z-index: 1;
}

.score-label {
    font-size: 14px;
    color: #2D4A3E;
    position: relative;
    z-index: 1;
}

/* Keywords Tags */
.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.keyword-tag {
    background: #FFF8F3;
    color: #2D4A3E;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid #B08D57;
    transition: all 0.3s ease;
}

.keyword-tag:hover {
    background: linear-gradient(135deg, #B08D57 0%, #CB997E 100%);
    color: #FFF8F3;
    transform: translateY(-2px);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #FFF8F3;
}

.sffc-btn-primary {
    background: linear-gradient(135deg, #B08D57 0%, #CB997E 100%);
    color: #FFF8F3;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(176, 141, 87, 0.3);
}

.sffc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(176, 141, 87, 0.4);
}

.sffc-btn-secondary {
    background: #2D4A3E;
    color: #FFF8F3;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sffc-btn-secondary:hover {
    background: #1B3A57;
    transform: translateY(-2px);
}

.sffc-btn-outline {
    background: transparent;
    color: #1B3A57;
    padding: 12px 24px;
    border: 2px solid #1B3A57;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sffc-btn-outline:hover {
    background: #1B3A57;
    color: #FFF8F3;
}

/* Tailor Button - Connect to AI System */
/* Note: sffc-btn-tailor styles are now in senna-vogue.css for consistency */
.tailor-cv-btn, 
.cv-tailor-button {
    background: linear-gradient(135deg, #B08D57 0%, #CB997E 100%);
    color: #FFF8F3 !important;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgba(176, 141, 87, 0.3);
    min-height: 42px;
}

.tailor-cv-btn:hover,
.cv-tailor-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(176, 141, 87, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .sffc-modal-content.sffc-modal-large {
        width: 95%;
        max-height: 95vh;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .sffc-btn-primary,
    .sffc-btn-secondary,
    .sffc-btn-outline {
        width: 100%;
    }
}

/* Success/Error States */
.ai-success {
    background: linear-gradient(135deg, #4CAF50, #81C784);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.ai-error {
    background: linear-gradient(135deg, #f44336, #ef5350);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.ai-warning {
    background: linear-gradient(135deg, #B08D57, #CB997E);
    color: #FFF8F3;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}