/* Shared master/player historical timeline appearance.
   One source for placement, sizes, mobile layout and interactions. */
#timeline-controls {
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #999;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    color: #222;
}
/* ==========================================================
   ВРЕМЕННАЯ ШКАЛА
   ========================================================== */

#timeline-controls {
    position: fixed;
    left: 50%;
    bottom: 10px;
    top: auto;
    transform: translateX(-50%);

    z-index: 1001;

    width: min(760px, calc(100vw - 320px));
    min-width: 420px;
    padding: 9px 13px 10px;

    box-sizing: border-box;
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 7px;
}

.timeline-title {
    font-size: 13px;
    font-weight: 600;
}

.timeline-current-era {
    margin-top: 1px;
    color: #6b7480;
    font-size: 10px;
    line-height: 1.15;
}

.timeline-current-year {
    padding-top: 1px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.timeline-present-button {
    padding: 5px 8px;
    background: white;
    border: 1px solid #c4c8cc;
    border-radius: 4px;
    color: #4f5962;
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
}

.timeline-present-button:hover:not(:disabled) {
    background: #f1f2f3;
}

.timeline-present-button:disabled {
    opacity: 0.5;
}

.timeline-era-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 7px;
}

.timeline-era-button {
    min-width: 0;
    padding: 5px 7px;
    background: #f3f4f5;
    border: 1px solid #d5d7da;
    border-radius: 4px;
    color: #50565d;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, color 120ms ease;
}

.timeline-era-button:hover {
    background: #eceff1;
}

.timeline-era-button.is-current {
    background: #e9edf1;
    border-color: #9ea6ae;
    color: #30363c;
    box-shadow: inset 0 -2px 0 rgba(70, 90, 110, 0.35);
}

#timeline-slider,
#player-year-slider {
    display: block;
    width: 100%;
    height: 19px;
    margin: 0;
}

.timeline-range {
    display: flex;
    justify-content: space-between;
    margin-top: 0;
    color: #777;
    font-family: monospace;
    font-size: 8px;
}

.timeline-year-field {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 4px;
    font-size: 11px;
}

#timeline-year,
#player-year {
    width: 72px;
    padding: 4px 6px;
}

.timeline-year-hint {
    display: none;
}


@media (max-width: 1120px) {
    #timeline-controls {
        width: min(700px, calc(100vw - 300px));
        min-width: 400px;
    }
}
@media (max-width: 900px) {
    #timeline-controls {
        left: 10px;
        right: 10px;
        bottom: 10px;
        transform: none;
        width: auto;
        min-width: 0;
    }
}
@media (max-width: 520px) {
    #timeline-controls { padding: 9px 11px 10px; }
    #timeline-slider,
#player-year-slider { height: 18px; }
}
