/* Ride Replay (Video) preview styles — phone frame look mirrors phone-nav */

.ride-replay-preview {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
}

.ride-replay-preview.hidden {
    display: none;
}

.rr-frame {
    position: relative;
    width: 360px;
    aspect-ratio: 9 / 16;
    border-radius: 28px;
    overflow: hidden;
    background: #0a0a0f;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5),
                0 0 0 6px #1a1a1f,
                0 0 0 8px #2a2a2f;
}

#rr-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0f;
}

.rr-hud {
    position: absolute;
    top: 9%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    z-index: 500;
    pointer-events: none;
    user-select: none;
}

.rr-logo-overlay {
    width: 42%;
    height: auto;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55))
            drop-shadow(0 0 2px rgba(0, 0, 0, 0.35));
}

.rr-stats {
    display: flex;
    align-items: center;
    gap: 18px;
}

.rr-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 74px;
}

.rr-stat-val {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.rr-stat-label {
    color: rgba(255, 255, 255, 0.78);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.rr-stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.35);
}

.rr-cursor-icon,
.rr-dot-icon {
    background: none;
    border: none;
}

.rr-download-wrap {
    text-align: center;
}

#btn-download-ride-replay {
    padding: 12px 26px;
    background: linear-gradient(135deg, #4DB8B8, #3a9a9a);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 8px 22px rgba(77, 184, 184, 0.3);
}

#btn-download-ride-replay:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(77, 184, 184, 0.4);
}

#btn-download-ride-replay:disabled {
    opacity: 0.6;
    cursor: wait;
}

.rr-download-note {
    margin-top: 8px;
    color: #8e8e93;
    font-size: 12px;
}

/* Waypoint rows */
.rr-wp-row {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.rr-wp-letter {
    flex: 0 0 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(77, 184, 184, 0.18);
    border: 1px solid rgba(77, 184, 184, 0.45);
    color: #4DB8B8;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rr-wp-row input {
    flex: 1;
    min-width: 0;
}

.rr-wp-remove {
    flex: 0 0 26px;
    height: 26px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    color: #8e8e93;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.rr-wp-remove:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fff;
}

/* Render progress */
.rr-progress {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.rr-progress.hidden {
    display: none;
}

.rr-progress-track {
    width: 280px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.rr-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: linear-gradient(90deg, #4DB8B8, #6cd8d8);
    transition: width 0.4s ease;
}

.rr-progress-text {
    color: #8e8e93;
    font-size: 12px;
}
