/**
 * Startovní listina - CSS
 * 
 * @package EXR
 */

/* ============================================
   TLAČÍTKO "STARTOVNÍ LISTINA"
   ============================================ */

.exr-start-list-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    margin-top: 30px; /* Větší mezera - bude pod sociálními sítěmi */
    /* Červeno-modrý gradient */
    background: linear-gradient(90deg, #c1272d 0%, #1565c0 100%);
    color: #fff;
    border: none;
    border-radius: 30px; /* Zaoblené rohy jako na webu */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.exr-start-list-button:hover {
    background: linear-gradient(90deg, #a01f23 0%, #0d47a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.exr-start-list-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.exr-start-list-icon {
    font-size: 20px;
    line-height: 1;
}

/* ============================================
   MODAL
   ============================================ */

.exr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exr-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.exr-modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 1;
}

.exr-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    color: #333;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.exr-modal-close:hover {
    background: #e74c3c;
    color: #fff;
    transform: rotate(90deg);
}

.exr-modal-content {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(90vh - 60px);
}

/* Prevent body scroll when modal is open */
body.exr-modal-open {
    overflow: hidden;
}

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

.exr-modal-loading {
    text-align: center;
    padding: 60px 20px;
}

.exr-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: exr-spin 1s linear infinite;
}

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

.exr-modal-loading p {
    color: #666;
    font-size: 16px;
}

.exr-modal-error {
    text-align: center;
    padding: 60px 20px;
}

.exr-modal-error p {
    color: #e74c3c;
    font-size: 16px;
}

/* ============================================
   STARTOVNÍ LISTINA - OBSAH
   ============================================ */

.exr-start-list-content {
    /* Wrapper pro veškerý obsah */
}

.exr-start-list-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
}

/* ============================================
   SEKCE (jako v dashboardu)
   ============================================ */

.exr-section {
    margin-bottom: 40px;
}

.exr-section-title {
    font-size: 20px;
    font-weight: 700;
    padding: 15px 20px;
    margin: 0 0 20px 0;
    border-radius: 8px 8px 0 0;
    color: #fff;
    /* Červeno-modrý gradient */
    background: linear-gradient(90deg, #c1272d 0%, #1565c0 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ============================================
   STATISTIKA
   ============================================ */

.exr-start-list-stats {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.exr-start-list-stats h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.exr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.exr-stat-group h4,
.exr-stat-group h5 {
    font-size: 14px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
}

.exr-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.exr-stat-item:last-child {
    border-bottom: none;
}

.exr-stat-total {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    padding: 15px;
    border-radius: 6px;
    border-bottom: none;
}

.exr-stat-total .exr-stat-label {
    font-weight: 600;
}

.exr-stat-label {
    font-size: 14px;
    color: #555;
}

.exr-stat-total .exr-stat-label {
    color: #fff;
}

.exr-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

.exr-stat-total .exr-stat-value {
    color: #fff;
    font-size: 24px;
}

/* ============================================
   TABULKA ZÁVODNÍKŮ
   ============================================ */

.exr-start-list-table {
    margin-top: 30px;
}

.exr-start-list-table h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.exr-registrations-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.exr-registrations-table thead {
    background: #f8f9fa;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
}

.exr-registrations-table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #7f8c8d;
}

.exr-registrations-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.2s ease;
}

.exr-registrations-table tbody tr:hover {
    background-color: #f8f9fa;
}

.exr-registrations-table tbody tr:last-child {
    border-bottom: none;
}

.exr-registrations-table tbody td {
    padding: 12px;
    font-size: 14px;
    color: #2c3e50;
}

.exr-flag {
    font-size: 18px;
}

/* ============================================
   STATISTICKÁ TABULKA (v1.5.66z)
   ============================================ */

.exr-stat-total-count {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border-radius: 6px;
    font-size: 18px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.exr-stat-total-count strong {
    font-size: 24px;
    font-weight: 700;
}

.exr-stats-tables-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.exr-stats-table-container h4 {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

.exr-stats-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.exr-stats-table thead {
    background: linear-gradient(90deg, #c1272d 0%, #1565c0 100%);
    color: #fff;
}

.exr-stats-table thead th {
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.exr-stats-table thead th:first-child {
    text-align: left;
    font-weight: 700;
}

.exr-stats-table thead th:last-child {
    border-right: none;
}

.exr-stats-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.2s ease;
}

.exr-stats-table tbody tr:hover {
    background-color: #f8f9fa;
}

.exr-stats-table tbody tr:last-child {
    border-bottom: none;
}

.exr-stats-table tbody th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    color: #2c3e50;
    background: #f8f9fa;
}

.exr-stats-table tbody td {
    padding: 12px 15px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.exr-stats-table tbody td:empty::before,
.exr-stats-table tbody td:contains('-') {
    color: #bdc3c7;
}

/* ============================================
   RESPONZIVITA
   ============================================ */

@media (max-width: 768px) {
    .exr-modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .exr-modal-content {
        padding: 20px;
    }
    
    .exr-start-list-title {
        font-size: 22px;
    }
    
    .exr-stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* v1.5.66z - Celkem nahoru */
    .exr-stat-total-count {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .exr-stat-total-count strong {
        font-size: 20px;
    }
    
    /* v1.5.66z - Tabulky pod sebou na mobilu */
    .exr-stats-tables-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .exr-stats-table-container h4 {
        font-size: 15px;
    }
    
    .exr-stats-table thead th,
    .exr-stats-table tbody th,
    .exr-stats-table tbody td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    /* Tabulka scrollovatelná na mobilu */
    .exr-start-list-table {
        overflow-x: auto;
    }
    
    .exr-registrations-table {
        min-width: 600px;
    }
    
    .exr-registrations-table thead th,
    .exr-registrations-table tbody td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .exr-start-list-button {
        width: 100%;
        justify-content: center;
    }
    
    .exr-modal-container {
        border-radius: 0;
    }
    
    .exr-start-list-title {
        font-size: 20px;
    }
}
