/**
 * Time Machine Visualization Styles
 */

.visualization-container {
    display: none;
    /* Initially hidden until form is submitted */
    margin-top: 30px;
}

/* Property info and Economic events cards */
.info-cards {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 30px;
}

#price-widget-container {
    width: 100%;
}

@media (min-width: 768px) {
    #price-widget-container {
        width: 40%;
    }
}

/* styles.css */

/* outer wrapper with its own border */
.info-card {
    width: 30%;
    padding: 8px;
    /* space between outer & inner border */
    background-color: #0F1D3E;
    border: 1px solid #8ef0ff9e;
    border-radius: 6px;
}

/* inner box that holds content + corner accents */
.info-card__inner {
    position: relative;
    background: inherit;
    border: 1px solid #8ef0ff9e;
    border-radius: 4px;
    padding: 25px;
    color: #FFF;
    font-family: Arial, sans-serif;
    min-height: 100%;
}

/* Title */
.info-card__title {
    color: #fff;
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

/* Description text */
.info-card__description {
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.4;
    color: #ffffffab;
}

/* Base for all corner accents */
.info-card__corner {
    position: absolute;
    width: 0;
    height: 0;
}

.info-card__corner::before,
.info-card__corner::after {
    content: "";
    position: absolute;
    background-color: #8ef0ff9e;
}

/* Top-left */
.info-card__corner--tl {
    top: 7px;
    left: 7px;
}

.info-card__corner--tl::before {
    top: 0;
    left: 0;
    width: 17px;
    height: 2px;
}

.info-card__corner--tl::after {
    top: 0;
    left: 0;
    width: 2px;
    height: 17px;
}

/* Top-right */
.info-card__corner--tr {
    top: 7px;
    right: 7px;
}

.info-card__corner--tr::before {
    top: 0;
    right: 0;
    width: 17px;
    height: 2px;
}

.info-card__corner--tr::after {
    top: 0;
    right: 0;
    width: 2px;
    height: 17px;
}

/* Bottom-right */
.info-card__corner--br {
    bottom: 7px;
    right: 7px;
}

.info-card__corner--br::before {
    bottom: 0;
    right: 0;
    width: 17px;
    height: 2px;
}

.info-card__corner--br::after {
    bottom: 0;
    right: 0;
    width: 2px;
    height: 17px;
}

/* Bottom-left */
.info-card__corner--bl {
    bottom: 7px;
    left: 7px;
}

.info-card__corner--bl::before {
    bottom: 0;
    left: 0;
    width: 17px;
    height: 2px;
}

.info-card__corner--bl::after {
    bottom: 0;
    left: 0;
    width: 2px;
    height: 17px;
}

/* 
.info-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(70, 130, 180, 0.3);
    border-radius: 8px;
    padding: 15px;
    width: 48%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.info-card h4 {
    color: #4682B4;
    margin-top: 0;
    border-bottom: 1px solid rgba(70, 130, 180, 0.3);
    padding-bottom: 10px;
} */

#economic-events ul {
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.8);
}

/* Central value display */
.value-display {
    text-align: center;
    position: relative;
    margin: 40px 0;
}

.value-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, rgba(70, 130, 180, 0.2) 0%, rgba(70, 130, 180, 0) 70%);
    border: 2px solid #4682B4;
    box-shadow: 0 0 30px rgba(70, 130, 180, 0.5),
        inset 0 0 30px rgba(70, 130, 180, 0.3);
    position: relative;
    z-index: 1;
}

.value-circle:before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 1px solid rgba(70, 130, 180, 0.3);
    z-index: -1;
}

.value-circle:after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-radius: 50%;
    border: 1px dashed rgba(70, 130, 180, 0.2);
    animation: spin 60s linear infinite;
    z-index: -2;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.value-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

#property-value {
    font-size: 30px;
    font-weight: bold;
    color: #FFFFFF;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
}

/* Slider container with border */
.slider-container {
    position: relative;
    /* margin: 20px 5px 40px; */

}

/* Years navigation above slider */
.years-navigation {
    display: flex;
    overflow-x: hidden;
    margin-bottom: 10px;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: #4682B4 rgba(70, 130, 180, 0.1);
    width: 100%;
}

.years-navigation::-webkit-scrollbar {
    height: 4px;
}

.years-navigation::-webkit-scrollbar-track {
    background: rgba(70, 130, 180, 0.1);
}

.years-navigation::-webkit-scrollbar-thumb {
    background-color: #4682B4;
    border-radius: 4px;
}

/* Year buttons - hidden by default */
.year-btn {
    flex: 1;
    text-align: center;
    padding: 5px 3px;
    margin: 0;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    /* display: none; */
    /* Hide by default */
    min-width: 0;
    /* Allow buttons to shrink below min-width */
    transform: rotate(60deg);
}
#current-year-btn{
    transform: scale(1.15) rotate(60deg);
    color:#ffffff;
}
/* Show visible years */
/* .year-btn.visible-year {
    display: block;
} */

/* Special styling for years with events */
.year-btn.event-year {
    color: #FF5252;
    font-weight: bold;
    position: relative;
}

/* .year-btn.event-year::before { */
    /*content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: #FF5252;
    border-radius: 50%; */
/* } */

.year-btn.event-year:hover {
    color: #FF5252;
    text-shadow: 0 0 4px rgba(255, 82, 82, 0.5);
}

/* Always show active year */
.year-btn.active {
    display: block;
    color: #FFFFFF;
    font-weight: bold;
    border-bottom: 2px solid #4682B4;
    font-size: 16px;
    transform: translateY(-2px);
}

.year-btn:hover {
    color: #FFFFFF;
}

/* Time slider styling */
#time-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 16px;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    --tm-fill: 50%;
    /* Default, will be updated by JS */
    margin-top: 10px;
}

/* WebKit track */
#time-slider::-webkit-slider-runnable-track {
    height: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(to right,
            #4682B4 var(--tm-fill),
            rgba(70, 130, 180, 0.2) var(--tm-fill));
}

/* Firefox track */
#time-slider::-moz-range-track {
    height: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(to right,
            #4682B4 var(--tm-fill),
            rgba(70, 130, 180, 0.2) var(--tm-fill));
}

/* Thumb styling */
#time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    margin-top: -4px;
    /* Center vertically over the track */
    border-radius: 50%;
    background: #4682B4;
    border: 3px solid #FFFFFF;
    box-shadow: 0 0 8px rgba(70, 130, 180, 0.8);
    position: relative;
    z-index: 2;
}

#time-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4682B4;
    border: 3px solid #FFFFFF;
    box-shadow: 0 0 8px rgba(70, 130, 180, 0.8);
    position: relative;
    z-index: 2;
}

/* Loading animation */
.loading {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Responsive styles */
@media (max-width: 768px) {
    .info-cards {
        flex-direction: column;
    }

    .info-card {
        width: 100%;
        margin-bottom: 15px;
    }

    .value-circle {
        width: 150px;
        height: 150px;
    }

    #property-value {
        font-size: 24px;
    }
}

/* Animation effects */
.animated-fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ------------------------- */
/* 1) CUSTOM TRACK STYLING  */
/* ------------------------- */
.tm-slider-scope>#time-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 16px;
    /* slightly taller */
    margin: 0;
    background: none;
    /* we’ll paint the track in the pseudo */
    cursor: pointer;
    --tm-fill: 50%;
    /* your JS will override this */
}

/* ======SCOPE EVERYTHING===== */
.tm‐slider‐scope {
    position: relative;
    width: 100%;

}

/* ======CURRENT YEAR LABEL===== */
#current-year {
    display: block;
    position: absolute;
    top: -22px;
    left: 0;
    /* moved in JS */
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: 600;
    color: #E91E63;
    /* pink arrow & text */
    pointer-events: none;
    white-space: nowrap;
}

#current-year.desktop-current-year {
    top: auto;
    bottom: -26px;
    /* Hide on mobile */
}

#current-year::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #E91E63;
}

#current-year.desktop-current-year::after {
    border-top: 0px;
    border-bottom: 6px solid #E91E63;
    top: auto;
    bottom: 110%;
}

#years-wrapper {
    position: relative;
    padding: 5px 10px;

    border: 2px solid #2d5f8b;
    /* Darker blue border */
    border-radius: 50px;
    /* padding: 15px 15px 10px; */
    /* Extra padding at top for years navigation */
    background-color: rgba(70, 130, 180, 0.1);
    /* Light blue background */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ======THE RANGE INPUT===== */
/* namespace variable: --tm-fill to avoid collisions */
#time-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 14px;

    /* background: linear-gradient(
    to right,
    #8EEFFF 0%,
    #8EEFFF var(--tm-fill),
    #2A2A3D var(--tm-fill),
    #2A2A3D 100%
  ); */
    background: #2a81fe;
    cursor: pointer;
}

/* Track styling */
.tm‐slider‐scope>#time-slider::-webkit-slider-runnable-track,
.tm‐slider‐scope>#time-slider::-moz-range-track {
    height: 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Thumb styling */
.tm‐slider‐scope>#time-slider::-webkit-slider-thumb,
.tm‐slider‐scope>#time-slider::-moz-range-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #a4c8d9;
    border: 3px solid #FFF;
    margin-top: -3px;
    /* center over track */
}

/* remove default focus outline */
.tm‐slider‐scope>#time-slider:focus {
    outline: none;
}

/* ======MIN / MAX YEAR LABELS===== */
.tm‐slider‐scope .slider-years {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: #FFF;
}


/* WebKit track */
#time-slider::-webkit-slider-runnable-track {
    height: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background:
        linear-gradient(to right,
            #8EEFFF var(--tm-fill),
            rgba(42, 42, 61, 0.4) var(--tm-fill));
}

/* Firefox track */
#time-slider::-moz-range-track {
    height: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background:
        linear-gradient(to right,
            #8EEFFF var(--tm-fill),
            rgba(42, 42, 61, 0.4) var(--tm-fill));
}

/* ------------------------- */
/* 2) HOLLOW CIRCLE THUMB    */
/* ------------------------- */
#time-slider::-webkit-slider-thumb,
#time-slider::-moz-range-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin-top: -2px;
    /* center vertically over a 16px track */
    border-radius: 50%;
    background: transparent;
    /* hollow */
    border: 3px solid #FFFFFF;

    /* subtle “glow” halo */
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);

    position: relative;
    /* to ensure it sits above the track */
    z-index: 2;
}

/* remove default focus outline */
#time-slider:focus {
    outline: none;
}




/* scoped to #price-widget-svg */
#price-widget-svg .bg-circle {
    fill: none;
    stroke: #0f1f3a91;
    stroke-width: 80px;
}

#price-widget-svg .ring {
    fill: none;
    stroke: #5ac6ff;
    stroke-width: 3;
}

#price-widget-svg .outher-ring {
    fill: none;
    stroke: #92FCFF;
    stroke-width: 6;
}

#price-widget-svg .ticks {
    fill: none;
    stroke: #ffffff;
    stroke-dasharray: 2 9;
    stroke-width: 20px;
}

#price-widget-svg .label {
    fill: #e0e9ff;
    font-family: sans-serif;
    font-size: 16px;
    text-anchor: middle;
}

#price-widget-svg .price {
    fill: #fff;
    font-family: sans-serif;
    font-size: 28px;
    font-weight: bold;
    text-anchor: middle;

    animation: bump 0.4s ease-in-out 0s 1 both;
    animation-play-state: paused;
}

@keyframes bump {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    30% {
        transform: scale(1.4);
        opacity: .8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.price.animate {
    animation-play-state: running;
}