/* Replay Controls Styling */
.replay-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: #1e222d;
    border-bottom: 1px solid #2a2e39;
    flex-shrink: 0;
}

.play-btn {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #d1d4dc;
    background: #2962ff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.play-btn:hover {
    background: #1e53e5;
}

.play-btn.playing {
    background: #f9a825;
}

.play-btn.playing:hover {
    background: #f57f17;
}

.reset-btn {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #d1d4dc;
    background: #2a2e39;
    border: 1px solid #363a45;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    background: #363a45;
}

.speed-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.speed-selector label {
    font-size: 12px;
    color: #787b86;
    font-weight: 500;
}

#speed-select {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #d1d4dc;
    background: #2a2e39;
    border: 1px solid #363a45;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
}

#speed-select:hover {
    border-color: #2962ff;
}

#speed-select:focus {
    border-color: #2962ff;
    box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.2);
}

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

.progress-bar {
    flex: 1;
    height: 6px;
    background: #2a2e39;
    border: 1px solid #363a45;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2962ff, #00b0ff);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-bar:hover .progress-fill {
    background: linear-gradient(90deg, #1e53e5, #0091ea);
}

.progress-text {
    font-size: 11px;
    color: #787b86;
    font-weight: 600;
    min-width: 80px;
    text-align: right;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

/* Chart wrapper adjustments for replay */
.chart-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.chart-container {
    width: 100%;
    height: 100%;
}

/* Overlay styling */
.unavailable-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(19, 23, 34, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.unavailable-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.unavailable-overlay .icon {
    font-size: 48px;
    color: #787b86;
    margin-bottom: 12px;
}

.unavailable-overlay .message {
    font-size: 14px;
    color: #d1d4dc;
    text-align: center;
    max-width: 400px;
    line-height: 1.5;
}

/* Replay status indicator */
.replay-status {
    font-size: 11px;
    color: #787b86;
    padding: 4px 8px;
    background: #2a2e39;
    border-radius: 3px;
    min-width: 60px;
    text-align: center;
}

.replay-status.active {
    color: #4caf50;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .replay-controls {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px;
    }

    .progress-container {
        order: 5;
        width: 100%;
        flex: 1 1 100%;
    }

    .speed-selector {
        flex: 1;
    }
}