/* ==========================================================================
   Mobile recommendation experience (IndexMobile.cshtml)
   --------------------------------------------------------------------------
   Loaded ALONGSIDE rec_css.css (not instead of it). rec_css.css supplies the
   shared primitives used on this page too (buttons, badges, alerts,
   suggestion dropdowns, sliders, etc.) — this file only adds the mobile
   accordion layout and a few touch-friendly tweaks. rec_css.css itself is
   never modified by this file.
   ========================================================================== */

.rec-m-app {
    font-family: "Rubik", sans-serif;
}

/* Sticky mobile header: the selected directors/films poster rail travels together with the
   "Step X of N" progress indicator, replacing the desktop sidebar step list. */
.rec-m-sticky {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0 -1rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #e2e1e8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .04);
}

/* The rail is reused as-is from the shared markup, but needs to be more compact once it's
   living inside the sticky strip instead of the normal page flow. */
.rec-m-sticky .rec-image-rail {
    margin-bottom: 0;
    padding: .55rem 1rem .4rem;
    border: none;
    border-bottom: 1px solid #ededf1;
    background: #fbfaf8;
}

.rec-m-sticky .rec-image-rail-track {
    gap: .6rem;
    padding-bottom: 0;
}

.rec-m-sticky .rec-image-rail-item {
    width: 52px;
    gap: .2rem;
}

.rec-m-sticky .rec-image-rail-thumb {
    width: 40px;
    height: 40px;
    font-size: .85rem;
}

.rec-m-sticky .rec-image-rail-item--film .rec-image-rail-thumb {
    width: 34px;
    height: 48px;
}

.rec-m-sticky .rec-image-rail-label {
    font-size: .6rem;
}

.rec-m-progress {
    padding: .6rem 1rem .75rem;
}

.rec-m-progress-bar {
    height: 6px;
    border-radius: 999px;
    background: #efece6;
    overflow: hidden;
}

.rec-m-progress-fill {
    height: 100%;
    background: #dd6900;
    border-radius: 999px;
    transition: width .25s ease;
}

.rec-m-progress-text {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .4rem;
    font-size: .78rem;
    color: #77747c;
}

    .rec-m-progress-text strong {
        color: #49484f;
        font-size: .82rem;
        font-weight: 600;
    }

/* Link shown on the mobile page allowing a user to opt back into the desktop layout. */
.rec-m-desktop-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin: .5rem 0 0;
    color: #dd6900;
    font-size: .8rem;
    font-weight: 500;
    text-decoration: underline;
}

/* ==========================================================================
   Accordion wizard shell
   ========================================================================== */

.rec-m-accordion {
    display: block;
}

.rec-m-accordion .rec-wizard-panel {
    min-width: 0;
}

.rec-accordion-header {
    display: flex;
    align-items: center;
    width: 100%;
    scroll-margin-top: calc(var(--rec-sticky-offset, 72px) + .6rem);
    gap: .75rem;
    margin-top: .6rem;
    padding: .85rem .9rem;
    border: 1px solid #e2e1e8;
    border-radius: .5rem;
    background: #fff;
    color: #49484f;
    font-family: "Rubik", sans-serif;
    font-size: .92rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

    .rec-accordion-header:first-child {
        margin-top: 0;
    }

    .rec-accordion-header:hover {
        border-color: #d8d6dd;
        background: #faf5ef;
    }

.rec-accordion-header-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border: 1px solid #d8d6dd;
    border-radius: 50%;
    color: #908e99;
    font-size: .85rem;
}

.rec-accordion-header-label {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: .5rem;
    line-height: 1.25;
}

    .rec-accordion-header-label small {
        padding: .15rem .4rem;
        color: #b04a1d;
        background: #fdeee4;
        border-radius: .3rem;
        font-size: .62rem;
        font-weight: 700;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

.rec-accordion-chevron {
    flex: 0 0 auto;
    color: #908e99;
    transition: transform .2s ease;
}

/* Current step */
.rec-accordion-header.is-current {
    border-color: #c36b24;
    background: #fffaf6;
    box-shadow: 0 0 0 1px #c36b24 inset;
}

    .rec-accordion-header.is-current .rec-accordion-header-index {
        border-color: #dd6900;
        background: #dd6900;
        color: #fff;
    }

    .rec-accordion-header.is-current .rec-accordion-chevron {
        transform: rotate(180deg);
        color: #dd6900;
    }

/* Completed steps */
.rec-accordion-header.is-complete .rec-accordion-header-index {
    border-color: #7a9f6a;
    color: #7a9f6a;
}

.rec-accordion-header.is-complete.is-confirmed .rec-accordion-header-index {
    background: #7a9f6a;
    color: #fff;
}

/* Required steps still missing a selection */
.rec-accordion-header.is-attention:not(.is-current) {
    border-color: #DE3907;
}

    .rec-accordion-header.is-attention:not(.is-current) .rec-accordion-header-index {
        border-color: #DE3907;
        color: #DE3907;
    }

/* The section body directly follows its header; give it a card-like wrapper so it
   reads as "inside" the accordion item rather than a free-floating block. */
.rec-m-accordion .rec-form-section {
    margin: 0 0 .6rem;
    padding: 1.1rem .9rem 1.5rem;
    border: 1px solid #e2e1e8;
    border-top: none;
    border-radius: 0 0 .5rem .5rem;
    background: #fffdfb;
}

.rec-accordion-header + .rec-form-section {
    margin-top: -1px;
}

/* ==========================================================================
   Touch-friendly tweaks
   ========================================================================== */

.rec-m-accordion input[type="text"],
.rec-m-accordion input[type="search"],
.rec-m-accordion select {
    min-height: 2.75rem;
    font-size: 1rem; /* avoids iOS Safari auto-zoom on focus */
}

.rec-m-accordion .rec-suggestions {
    max-height: 55vh;
    overflow-y: auto;
}

.rec-m-accordion .rec-step-nav {
    flex-wrap: wrap;
}

.rec-m-accordion .rec-step-back,
.rec-m-accordion .rec-step-next {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 2.75rem;
}

/* Keep the sticky strip full-bleed and compact on small screens. */
@media (max-width: 575.98px) {
    .rec-m-sticky {
        margin: 0 -.75rem 1rem;
    }

    .rec-m-progress {
        padding: .5rem .75rem .65rem;
    }
}
