/* Zwem Challenge Frontend Styling */

.zc-challenge-container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 20px;
    font-family: Roboto, sans-serif;
}

.zc-header {
    text-align: center;
    margin-bottom: 40px;
}

.zc-header h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #dd3333;
    font-weight: 500;
}

.zc-goal {
    font-size: 1.2em;
    color: #333;
    margin: 0;
    font-weight: 300;
}

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

.zc-stat-card {
    background: #dd3333;
    color: white;
    padding: 30px;
    border-radius: 0;
    text-align: center;
    border-bottom: 5px solid #a61001;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.zc-stat-card:hover {
    transform: translateY(-3px);
    background: #c92a2a;
}

.zc-stat-card:nth-child(2) {
    background: #009d50;
    border-bottom-color: #007a3d;
}

.zc-stat-card:nth-child(2):hover {
    background: #008a46;
}

.zc-stat-card:nth-child(3) {
    background: #009d50;
    border-bottom-color: #007a3d;
}

.zc-stat-card:nth-child(3):hover {
    background: #008a46;
}

.zc-stat-card:nth-child(4) {
    background: #ffeeaa;
    border-bottom-color: #ddc777;
    color: #333;
}

.zc-stat-card:nth-child(4):hover {
    background: #ffe994;
}

.zc-stat-card:nth-child(5) {
    background: #009d50;
    border-bottom-color: #007a3d;
}

.zc-stat-card:nth-child(5):hover {
    background: #008a46;
}

.zc-stat-card:nth-child(6) {
    background: #dd3333;
    border-bottom-color: #a61001;
}

.zc-stat-card:nth-child(6):hover {
    background: #c92a2a;
}

.zc-stat-value {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.zc-stat-label {
    font-size: 1em;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.zc-stat-detail {
    font-size: 0.85em;
    margin-top: 8px;
    opacity: 0.95;
    font-weight: 500;
}

/* Tempo stat card styling */
.zc-stat-card.zc-on-track {
    background: #4CAF50;
    border-bottom-color: #388E3C;
}

.zc-stat-card.zc-on-track:hover {
    background: #45a049;
}

.zc-stat-card.zc-behind {
    background: #FF9800;
    border-bottom-color: #F57C00;
}

.zc-stat-card.zc-behind:hover {
    background: #FB8C00;
}

/* Progress Section */
.zc-progress-section {
    margin-bottom: 40px;
}

.zc-progress-section h3 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #dd3333;
    font-weight: 500;
}

.zc-progress-bar {
    width: 100%;
    height: 50px;
    background-color: #f5f5f5;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid #ddd;
}

.zc-progress-fill {
    height: 100%;
    background: #dd3333;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
    transition: width 1s ease-out;
    position: relative;
    animation: progressAnimation 2s ease-out;
}

@keyframes progressAnimation {
    from {
        width: 0%;
    }
}

.zc-progress-text {
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Sessions Section */
.zc-sessions-section {
    margin-bottom: 40px;
}

.zc-sessions-section h3 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #dd3333;
    font-weight: 500;
}

.zc-sessions-list {
    background: white;
    border-radius: 0;
    border: 1px solid #ddd;
    overflow: hidden;
}

.zc-session-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.2s ease;
    align-items: center;
}

.zc-session-item:last-child {
    border-bottom: none;
}

.zc-session-item:hover {
    background-color: #f8f9fa;
}

.zc-session-datum {
    font-weight: 500;
    color: #dd3333;
    font-size: 0.95em;
}

.zc-session-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.zc-session-details strong {
    color: #000;
    font-size: 1.1em;
    font-weight: 500;
}

.zc-session-locatie {
    color: #666;
    font-size: 0.9em;
    font-weight: 300;
}

.zc-session-locatie:before {
    content: "📍 ";
}

.zc-session-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    text-align: right;
}

.zc-session-afstand {
    font-weight: 500;
    color: #009d50;
    font-size: 1.1em;
}

.zc-session-tijd {
    color: #666;
    font-size: 0.9em;
    font-weight: 300;
}

.zc-session-tijd:before {
    content: "⏱️ ";
}

.zc-session-pace {
    color: #333;
    font-size: 0.9em;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.zc-session-pace-icon:before {
    content: "";
}

.zc-session-pace-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l5 16H7L12 3z'/%3E%3Cpath d='M12 7l4-3'/%3E%3Cpath d='M12 7l-3 2'/%3E%3Ccircle cx='12' cy='11' r='1'/%3E%3C/svg%3E") no-repeat center center;
    background-size: 16px 16px;
}

/* Chart Section */
.zc-chart-section {
    margin-bottom: 40px;
}

.zc-chart-section h3 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #dd3333;
    font-weight: 500;
}

#zc-chart {
    width: 100%;
    max-width: 800px;
    height: auto;
    background: white;
    border-radius: 0;
    border: 1px solid #ddd;
    padding: 20px;
    box-sizing: border-box;
}

/* Responsive Design */
@media (max-width: 768px) {
    .zc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .zc-session-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .zc-session-stats {
        align-items: flex-start;
        flex-direction: row;
        gap: 15px;
    }
    
    .zc-header h2 {
        font-size: 2em;
    }
    
    .zc-stat-value {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .zc-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .zc-challenge-container {
        padding: 10px;
    }
    
    .zc-stat-card {
        padding: 20px;
    }
}
