/* ==========================================================
   Ember Horizontal Scroll – Frontend Styles
   Horizontal Scroll on Vertical Scroll

   Uses position:fixed/absolute instead of sticky because
   Impreza's .l-canvas has overflow:hidden.
   ========================================================== */

.ehs-marker-wrap {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

/* ── Space Holder ── */
.ehs-space-holder {
    position: relative;
    width: 100%;
    overflow: visible;
}

/* ── Fixed Container ── */
.ehs-fixed-container {
    overflow: hidden;
    pointer-events: none;
    padding-bottom: 48px;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .ehs-fixed-container {
        overflow: visible !important;
    }
}

.ehs-inner-constrainer {
    padding-bottom: 50px !important;
}

.ehs-fixed-container * {
    pointer-events: auto;
}

/* ── Horizontal Wrapper ── */
.ehs-horizontal-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    height: 100%;
    will-change: transform;
}

/* ── Scroll Panels ── */
.ehs-scroll-panel {
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

/* ── Fullscreen Mode ── */
.ehs-mode-fullscreen .ehs-scroll-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ehs-mode-fullscreen .ehs-scroll-panel > .l-section-h {
    margin: auto 0;
    width: 100%;
}

/* ── Natural Mode ── */
.ehs-mode-natural .ehs-scroll-panel {
    height: auto;
    min-height: 100%;
}

.ehs-mode-natural {
    align-items: stretch;
}

/* ── Fix margins ── */
.ehs-scroll-panel {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.ehs-scroll-panel .l-section-h {
    max-width: 100%;
}

/* ── Intra-row mode ── */
.ehs-scroll-panel.g-cols,
.ehs-scroll-panel.vc_inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ── Print styles ── */
@media print {
    .ehs-space-holder {
        height: auto !important;
    }

    .ehs-fixed-container {
        position: static !important;
        height: auto !important;
        overflow: visible !important;
    }

    .ehs-horizontal-wrapper {
        flex-direction: column !important;
        width: 100% !important;
        transform: none !important;
        will-change: auto;
    }

    .ehs-scroll-panel {
        width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
}

/* ── Progress Bar ── */
.ehs-progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #1a1a1a;
    color: #d37900;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    gap: 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
    pointer-events: none;
}

.ehs-progress-bar.ehs-progress-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Track */
.ehs-progress-track {
    flex: 1;
    height: 4px;
    background: rgba(211, 121, 0, 0.25);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

/* Fill */
.ehs-progress-fill {
    height: 100%;
    background: #d37900;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

/* Panel dots */
.ehs-progress-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.ehs-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(211, 121, 0, 0.35);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ehs-progress-dot.ehs-dot-active {
    background: #d37900;
    transform: scale(1.3);
}

.ehs-progress-dot.ehs-dot-done {
    background: rgba(211, 121, 0, 0.7);
}

/* Label */
.ehs-progress-label {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Accessibility */
.ehs-progress-bar:focus-visible {
    outline: 3px solid #d37900;
    outline-offset: -3px;
}

@media (prefers-reduced-motion: reduce) {
    .ehs-progress-bar {
        transition: none !important;
    }
    .ehs-progress-fill {
        transition: none !important;
    }
}

/* ── CTA Button ── */
.ehs-cta-button {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background-color: #d37900;
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    z-index: 100;
    box-sizing: border-box;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.ehs-cta-button:hover,
.ehs-cta-button:focus-visible {
    background-color: #b9571e;
    transform: translateY(-1px);
}

.ehs-cta-button:focus-visible {
    outline: 3px solid #e3a22b;
    outline-offset: -3px;
}

.ehs-cta-button:active {
    transform: translateY(0);
    background-color: #8D420A;
}

/* Desktop: sticky at viewport bottom */
.ehs-cta-button--sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
}

.ehs-cta-button--sticky.ehs-cta-visible {
    opacity: 1;
    visibility: visible;
}

/* Mobile */
@media (max-width: 767px) {
    .ehs-scroll-panel,
    .ehs-inner-panel {
        overflow: visible !important;
        height: auto !important;
        min-height: 100% !important;
    }
    .ehs-inner-constrainer {
        min-height: auto !important;
    }
    .ehs-progress-bar {
        pointer-events: none;
    }
    .ehs-progress-bar a,
    .ehs-progress-bar button {
        pointer-events: auto;
    }
    .ehs-cta-button--sticky {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* ── Accessibility: reduce motion ── */
@media (prefers-reduced-motion: reduce) {
    .ehs-horizontal-wrapper {
        transition: none !important;
    }
    .ehs-cta-button {
        transition: none !important;
    }
}
