/**
 * Mobility Trailblazers Frontend Core Styles
 * Version: 3.0.0
 * Updated: 2025-08-17
 * 
 * Dependencies: mt-variables.css, mt-components.css
 * 
 * This file contains core frontend styles ONLY:
 * - General containers
 * - Winners display
 * - Progress indicators
 * - Notifications
 * - Loading states
 * - Statistics
 * - Language switcher
 * 
 * Split into modules:
 * - mt-candidate-grid.css (grid system)
 * - mt-evaluation-forms.css (evaluation interfaces)
 * - mt-jury-dashboard-enhanced.css (jury features)
 */

/* ===================================
   GENERAL FRONTEND STYLES
   =================================== */

/* General Frontend Styles */
.mt-container {
    margin: 20px 0;
    padding: 30px;
    color: var(--mt-body-text);
    background: var(--mt-bg-beige);
    border-radius: 12px;
}

.mt-container h1,
.mt-container h2,
.mt-container h3,
.mt-container h4 {
    font-weight: 600;
    color: var(--mt-primary);
}

.mt-container a {
    text-decoration: none;
    color: var(--mt-secondary);
    transition: color 0.3s ease;
}

.mt-container a:hover {
    text-decoration: underline;
    color: var(--mt-accent);
}

/* ===================================
   WINNERS DISPLAY
   =================================== */

/* Winners Display */
.mt-winners-display {
    margin: 20px 0;
    padding: 40px;
    text-align: center;
    background: var(--mt-bg-base);
    border: 2px solid var(--mt-blue-accent);
    border-radius: 12px;
}

.mt-winners-header {
    margin-bottom: 40px;
}

.mt-winners-header h2 {
    margin: 0 0 10px;
    font-size: 36px;
    color: var(--mt-primary);
}

.mt-winner-category {
    margin: 40px 0;
}

.mt-category-title {
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--mt-secondary);
}

.mt-winner-card {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    color: white;
    background: linear-gradient(135deg, var(--mt-primary) 0%, var(--mt-secondary) 100%);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgb(0 60 61 / 20%);
}

.mt-winner-rank {
    margin: 0 0 10px;
    font-size: 48px;
    font-weight: 700;
}

.mt-winner-name {
    margin: 0 0 10px;
    font-size: 28px;
}

.mt-winner-score {
    font-size: 20px;
    opacity: 0.9;
}

/* ===================================
   PROGRESS INDICATOR
   =================================== */

/* Progress Indicator */
.mt-progress-indicator {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.mt-progress-step {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin: 0 10px;
    font-weight: 700;
    color: var(--mt-primary);
    background: var(--mt-blue-accent);
    border-radius: 50%;
}

.mt-progress-step.active {
    color: white;
    background: var(--mt-primary);
}

.mt-progress-step.completed {
    color: white;
    background: var(--mt-accent);
}

.mt-progress-step::after {
    position: absolute;
    top: 50%;
    left: 100%;
    width: 80px;
    height: 2px;
    background: var(--mt-blue-accent);
    transform: translateY(-50%);
    content: '';
}

.mt-progress-step:last-child::after {
    display: none;
}

/* ===================================
   NOTIFICATIONS
   =================================== */

/* Notifications */
.mt-notification {
    display: flex;
    align-items: center;
    margin: 20px 0;
    padding: 15px 20px;
    border-radius: 8px;
    gap: 15px;
}

.mt-notification-success {
    color: var(--mt-primary);
    background: rgb(0 60 61 / 10%);
    border: 1px solid var(--mt-primary);
}

.mt-notification-error {
    color: var(--mt-accent);
    background: rgb(193 105 60 / 10%);
    border: 1px solid var(--mt-accent);
}

.mt-notification-info {
    color: var(--mt-secondary);
    background: rgb(164 220 213 / 20%);
    border: 1px solid var(--mt-blue-accent);
}

/* ===================================
   LOADING STATES
   =================================== */

/* Loading States */
.mt-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: var(--mt-overlay-bg);
}

.mt-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgb(255 255 255 / 30%);
    border-top-color: white;
    border-radius: 50%;
    animation: mt-spin 1s linear infinite;
}

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

/* ===================================
   EVALUATION STATISTICS
   =================================== */

/* Evaluation Statistics Styles */
.mt-evaluation-stats {
    margin: 20px 0;
    padding: 30px;
    background: var(--mt-bg-base);
    border: 1px solid var(--mt-blue-accent);
    border-radius: 12px;
}

.mt-evaluation-stats h3 {
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: 600;
    color: var(--mt-primary);
}

.mt-evaluation-stats h4 {
    margin: 20px 0 15px;
    font-size: 18px;
    font-weight: 600;
    color: var(--mt-secondary);
}

/* Stats Grid */
.mt-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mt-stat-box {
    padding: 25px;
    text-align: center;
    background: var(--mt-bg-beige);
    border: 1px solid var(--mt-blue-accent);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mt-stat-box:hover {
    border-color: var(--mt-secondary);
    box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
    transform: translateY(-2px);
}

.mt-stat-box .mt-stat-number {
    display: block;
    margin: 0;
    font-size: 36px;
    font-weight: 700;
    color: var(--mt-primary);
}

.mt-stat-box .mt-stat-label {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: var(--mt-body-text);
}

/* Criteria Stats */
.mt-criteria-stats {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--mt-blue-accent);
}

.mt-criteria-bars {
    margin-top: 20px;
}

.mt-criterion-bar {
    margin-bottom: 15px;
}

.mt-bar-label {
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mt-primary);
}

.mt-bar-container {
    position: relative;
    height: 30px;
    overflow: hidden;
    background: var(--mt-blue-accent);
    border-radius: 20px;
}

.mt-bar-fill {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    padding-right: 10px;
    background: linear-gradient(90deg, var(--mt-primary) 0%, var(--mt-secondary) 100%);
    border-radius: 20px;
    transition: width 0.5s ease;
}

.mt-bar-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--mt-bg-base);
}

/* Category Stats */
.mt-category-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap: 20px;
    margin-top: 20px;
}

.mt-category-stat-item {
    padding: 20px;
    background: var(--mt-bg-beige);
    border: 1px solid var(--mt-blue-accent);
    border-radius: 8px;
}

.mt-category-stat-item h4 {
    margin: 0 0 15px;
    font-size: 16px;
    color: var(--mt-primary);
}

.mt-category-metrics {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.mt-metric {
    font-size: 14px;
    color: var(--mt-body-text);
}

.mt-metric strong {
    display: block;
    margin-bottom: 5px;
    font-size: 24px;
    color: var(--mt-secondary);
}

/* Jury Stats Table */
.mt-jury-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.mt-jury-stats-table th {
    padding: 12px;
    font-weight: 600;
    text-align: left;
    color: var(--mt-bg-base);
    background: var(--mt-primary);
}

.mt-jury-stats-table td {
    padding: 12px;
    border-bottom: 1px solid var(--mt-blue-accent);
    color: var(--mt-body-text);
}

.mt-jury-stats-table tr:last-child td {
    border-bottom: none;
}

.mt-jury-stats-table tr:hover {
    background: rgb(164 220 213 / 10%);
}

/* Mini Progress Bar */
.mt-progress-mini {
    position: relative;
    height: 20px;
    overflow: hidden;
    background: var(--mt-blue-accent);
    border-radius: 10px;
}

.mt-progress-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mt-primary) 0%, var(--mt-secondary) 100%);
    transition: width 0.3s ease;
}

.mt-progress-mini-text {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 12px;
    font-weight: 600;
    color: var(--mt-primary);
    transform: translate(-50%, -50%);
}

/* ===================================
   LANGUAGE SWITCHER
   =================================== */

/* Language Switcher */
.mt-language-switcher {
    display: inline-flex;
    align-items: center;
    padding: 5px;
    background: var(--mt-bg-base);
    border: 1px solid var(--mt-blue-accent);
    border-radius: 20px;
    gap: 5px;
}

.mt-language-switcher .mt-lang-option {
    padding: 5px 15px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mt-language-switcher .mt-lang-option:hover {
    background: var(--mt-bg-beige);
}

.mt-language-switcher .mt-lang-option.active {
    color: white;
    background: var(--mt-primary);
}

/* ===================================
   UTILITY CLASSES
   =================================== */

/* Text Utilities */
.mt-text-center {
    text-align: center !important;
}

.mt-text-left {
    text-align: left !important;
}

.mt-text-right {
    text-align: right !important;
}

/* Spacing Utilities */
.mt-mb-0 {
    margin-bottom: 0 !important;
}

.mt-mb-1 {
    margin-bottom: 10px !important;
}

.mt-mb-2 {
    margin-bottom: 20px !important;
}

.mt-mb-3 {
    margin-bottom: 30px !important;
}

.mt-mt-0 {
    margin-top: 0 !important;
}

.mt-mt-1 {
    margin-top: 10px !important;
}

.mt-mt-2 {
    margin-top: 20px !important;
}

.mt-mt-3 {
    margin-top: 30px !important;
}

/* Display Utilities */
.mt-d-none {
    display: none !important;
}

.mt-d-block {
    display: block !important;
}

.mt-d-flex {
    display: flex !important;
}

.mt-d-grid {
    display: grid !important;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* General Responsive Adjustments */
@media (width <= 768px) {
    .mt-container {
        padding: 20px;
    }
    
    .mt-winners-display {
        padding: 30px 20px;
    }
    
    .mt-winner-card {
        padding: 20px;
    }
    
    .mt-winner-rank {
        font-size: 36px;
    }
    
    .mt-winner-name {
        font-size: 24px;
    }
    
    .mt-evaluation-stats {
        padding: 20px;
    }
    
    .mt-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (width <= 480px) {
    .mt-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .mt-category-stats {
        grid-template-columns: 1fr;
    }
    
    .mt-progress-step {
        width: 30px;
        height: 30px;
        margin: 0 5px;
        font-size: 14px;
    }
    
    .mt-progress-step::after {
        width: 40px;
    }
}

/* ===================================
   CRITICAL FIXES
   =================================== */

/* Hero Pattern Fix - Added 2025-08-17 */
.mt-hero-pattern {
    max-height: 400px !important;
    overflow: hidden !important;
}

/* Force Evaluation Criteria title to be visible - Priority fix */
body .mt-evaluation-page .mt-section-title,
body .mt-scoring-section h2 {
    display: block !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    text-align: center !important;
    color: var(--mt-primary, #212529) !important;
    background: none !important;
    visibility: visible !important;
}

/* Center Evaluation Criteria - Added 2025-08-17 */
.mt-scoring-section {
    text-align: center !important;
}

.mt-scoring-section h2 {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

/* Evaluation Header Layout */
.mt-scoring-section .mt-evaluation-header {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}
