/* ==========================================================
SLIDER.CSS
Time track, arrows, thumb and large BC/AD year.

Change ONLY these two values to move the whole SLIDER:
--slider-top
--slider-left
========================================================== */

/* ======================================================
current version
v0.3.7
========================================================= */

:root {
    --slider-top: 1rem;
    --slider-left: 1rem;
    
    --slider-width: 26rem;
    
    --track-height: 1.7rem;
    --thumb-size: 2.1rem;
    --arrow-size: 2.1rem;
    

    --arrow-gap: 1.2rem;
    
    --monarchy: #174d3a;
    --republic: #ff0000;
    --empire: #5b2a72;
    
    --slider-shadow:
    0 0.4rem 0.6rem rgba(0, 0, 0, 0.60),
    0 0.4rem 0.6rem rgba(0, 0, 0, 0.30);
    
    --slider-radius: 0.1rem;
}

.roman-slider {
    position: absolute;
    top: var(--slider-top);
    left: var(--slider-left);
    width: var(--slider-width);
    user-select: none;

    border-radius: 0.5rem;

    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(0.5rem);
    padding: 0.4rem;
    border: 1px solid #ddd;

    box-shadow:
    0 0 0.5rem rgba(0, 0, 0, 1);

    z-index: 2000;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: var(--arrow-gap);
}

    .slider-wrap {
    flex: 1;
    min-width: 0;
    padding: 0.4rem 0;
}

.track {
    position: relative;
    display: flex;
    width: 100%;
    height: var(--track-height);
    overflow: visible;
    border: solid 1px #fff;
    border-radius: var(--slider-radius);
    cursor: pointer;
    box-shadow: var(--slider-shadow);
}

.period {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    text-shadow: none;
    overflow: hidden;
}

.monarchy {
    flex: 244;
    background: var(--monarchy);
}

.republic {
    flex: 482;
    background: var(--republic);
}

    .empire {
    flex: 503;
    background: var(--empire);
}

.period span {
    pointer-events: none;
    white-space: nowrap;
}

.thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: var(--thumb-size);
    height: var(--thumb-size);
    transform: translate(-50%, -50%);
    background: #fff;
    border: 1px solid #222;
    border-radius: 0.2rem;
    box-shadow: var(--slider-shadow);
    cursor: grab;
    z-index: 3;
}

.thumb:active {
    cursor: grabbing;
}

.arrow-button {
    flex: 0 0 var(--arrow-size);
    width: var(--arrow-size);
    height: var(--arrow-size);
    padding: 0;
    border: 1px solid #222;
    border-radius: 0.2rem;
    background: #fff;
    color: #333;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--slider-shadow);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.arrow-button:hover {
    transform: translateY(-1px);
}

.arrow-button:active {
    transform: translateY(1px);
}

.arrow-button:disabled {
    opacity: 0.45;
    cursor: default;
}

/* ----------------------------------------------------------
BC / AD YEAR
Left edge deliberately aligns with the left edge of the
left arrow box.
---------------------------------------------------------- */

.year-display {
    margin-top: 0.5rem;
    white-space: nowrap;
    text-align: left;
    color: #fff;
    text-shadow: var(--slider-shadow);
}

.year {
    font-family:
    "Charlemagne",
    "Charlemagne Std",
    "Charlemagne Standard",
    "Trajan Pro",
    "Times New Roman",
    serif;
    font-size: 3.8rem;
    font-weight: 500;
    line-height: 1;
    text-shadow: 0.2rem 0.2rem 0.4rem black;
}

/* ----------------------------------------------------------
YEAR JUMP
The controls sit to the right of the large BC/AD year.
---------------------------------------------------------- */


#yearSelectionBoxPackage {
  display: flex;         
  flex-direction: column;   
  gap: 0.2rem;             
}

#yearSelectionBox {
  display: flex;         
  flex-direction: row;  
  gap: 0.5rem;             
}


.year-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: max-content;
}

.year-jump {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #fff;
    text-shadow: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.8rem;
    white-space: nowrap;
}

#yearInput {
    box-sizing: border-box;
    width: 3rem;
    height: 1.5rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 0.2rem;
    background: transparent;
    color: #fff;
    font: 14px Arial, Helvetica, sans-serif;

}

#yearInput:focus {
    outline: 1px solid #222;
}

.era-choice {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    height: 1.5rem;
    padding: 0 0.3rem;
    border: 1px solid #ddd;
    border-radius: 0.2rem;
    background: transparent;
    color: #ddd;

}

.era-choice label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

.era-choice input {
    margin: 0;
    accent-color: #333;
}

#jumpButton {
    height: 1.5rem;
    border: 1px solid #000;
    border-radius: 0.2rem;
    background: #fff;
    color: #222;

    font-size: 0.9rem;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    cursor: pointer;
}

#jumpButton:hover {
    transform: translateY(-1px);
}

#jumpButton:active {
    transform: translateY(1px);
}

@media (max-width: 650px) {
    :root {
        --slider-width: calc(100vw - 50px);
        --arrow-gap: 26px;
    }
}
