/* Nur Geräte mit Touchscreen ansprechen */
@media (hover: none) and (pointer: coarse) {
    input, textarea, select {
        font-size: max(16px, 1em) !important;
    }
}

/* ============================================
           RUNNER DASHBOARD - MOBILE FIRST
           ============================================ */

.runner-dashboard {
    max-width: 420px;
    margin: 0 auto;
    padding: 12px 16px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /*background: #f5f7fa;*/
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #aaa;
}

.dashboard-starter-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.starter-number {
    background: #1e5799;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.starter-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
}

.dashboard-exit-btn:hover {
    color: #d33333;
}

/* Cards */
.dashboard-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
    border: 1px solid #aaa;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fafbfc;
    border-bottom: 1px solid #f0f2f5;
}

.card-icon {
    font-size: 18px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    flex: 1;
}

.card-content {
    padding: 12px 16px;
}

/* Race Info */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f5f7fa;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 13px;
    color: #6b7280;
}

.info-value {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a2e;
    text-align: right;
}

/* Progress */
.progress-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 12px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e5799;
    display: block;
}

.stat-label {
    font-size: 11px;
    color: #6b7280;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: #e8ecf1;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar-track {
    flex: 1;
    height: 6px;
    background: #e8ecf1;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e5799, #4CAF50);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-percent {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    min-width: 44px;
    text-align: right;
}

/* Images Grid */
.dashboard-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
}
.dashboard-images-single {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
}

.image-card {
    background: #f0f2f5;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/10;
    display: flex;
    align-items: start;
    justify-content: center;
    min-height: 80px;
    padding:20px;
}

.image-card-large {
    grid-row: span 2;
    aspect-ratio: 1/1.2;
    min-height: 160px;
}

.image-placeholder {
    color: #9aa0b0;
    font-size: 13px;
    text-align: center;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Schedule Accordion */
.accordion-trigger {
    cursor: pointer;
    user-select: none;
}

.accordion-trigger .accordion-icon {
    font-size: 12px;
    color: #9aa0b0;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.accordion-trigger.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding-top: 0;
}

.accordion-content.open {
    display: block;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f7fa;
}

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

.schedule-time {
    font-weight: 600;
    color: #1a1a2e;
}

.schedule-event {
    color: #6b7280;
}

.schedule-card {
    padding: 0px 20px 10px;
}

/* Actions */
.dashboard-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.action-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.action-btn.primary {
    background: #1e5799;
    color: #ffffff;
}

.action-btn.primary:active {
    transform: scale(0.96);
}

.action-btn.secondary {
    background: #f0f2f5;
    color: #1a1a2e;
}

.action-btn.secondary:active {
    transform: scale(0.96);
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 420px) {
    .runner-dashboard {
        padding: 8px 10px 16px;
    }
    .stat-value {
        font-size: 20px;
    }
    .image-card-large {
        min-height: 130px;
    }
    .image-card {
        min-height: 60px;
    }
}


/* Aufklappbare Zeile: Zeiger + Icon */
.info-row.is-toggleable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background 0.15s;
}



/* Pfeil-Icon rechts */
.info-toggle-icon {
    margin-left: 8px;
    color: #1e5799;
    font-size: 1em;
    transition: transform 0.25s ease;
    display: inline-block;
}

.info-row.is-toggleable.is-open .info-toggle-icon {
    transform: rotate(180deg);
}

/* Detailzeile: leichte Einrückung + dezente Optik */
.info-row-detail {
    background: #f2f6fd;
    border-left: 3px solid #1e5799;
    padding-left: 12px;
    font-size: 0.92em;
    animation: slideDown 0.2s ease;
}

.info-row-detail[hidden] {
    display: none;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}


.countdown-ring {
    position: relative;
    width: 140px;
    height: 140px;
    display: none;              /* wird per JS auf flex gesetzt, wenn relevant */
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.countdown-ring svg {
    transform: rotate(-90deg);  /* Start oben, nicht rechts */
    width: 100%;
    height: 100%;
}

.countdown-ring .ring-bg {
    fill: none;
    stroke: #e5e5e5;
    stroke-width: 8;
}

.countdown-ring .ring-fill {
    fill: none;
    stroke: #e63946;            /* deine Akzentfarbe */
    stroke-width: 8;
    stroke-linecap: round;
    /* Umfang = 2 * PI * r = 2 * PI * 45 ≈ 282.74 */
    stroke-dasharray: 282.74;
    stroke-dashoffset: 282.74;  /* voll "leer" am Anfang */
    transition: stroke-dashoffset 0.5s linear;
}

.countdown-ring .ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.4rem;
    line-height: 1;
}

.countdown-ring .ring-label small {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.7;
    margin-top: 4px;
}