@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/**
 * ASEP - Step 2: Enter Prescription
 * Presentation-only layer. The existing form markup, field names, IDs,
 * validation hooks, AJAX handlers and navigation targets remain untouched.
 * The desktop shell mirrors the approved Step 1 split-screen layout.
 */

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) {
    --ep-step2-panel: #f7f7f7;
    --ep-step2-white: #ffffff;
    --ep-step2-ink: #111111;
    --ep-step2-muted: #5b5b5b;
    --ep-step2-border: #cccccc;
    --ep-step2-yellow: #ffd600;
}

/* Remove the old product-name/price strip; keep its existing close control. */
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-modal-header {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 50;
    display: block;
    width: 32px;
    height: 32px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-modal-header-info {
    display: none !important;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #333333;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-close:hover {
    background: transparent;
    color: #111111;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-modal-container {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--ep-step2-white);
}

/* -------------------------------------------------------------------------
   Left panel: match the approved Step 1 product presentation exactly.
   ------------------------------------------------------------------------- */
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-info {
    position: relative;
    display: block;
    flex: 0 0 40%;
    width: 40%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-right: 1px solid #bbbbbb;
    background: var(--ep-step2-white);
    box-sizing: border-box;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-image {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(87.1%, 669px);
    max-width: 669px;
    height: auto;
    max-height: 217px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 669 / 217;
    background: transparent;
    transform: translate(-50%, -50%);
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    object-fit: contain;
    object-position: center;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-details {
    position: absolute;
    top: 68%;
    right: clamp(24px, 2.6vw, 50px);
    left: clamp(24px, 2.6vw, 50px);
    display: block;
    width: auto;
    max-width: 669px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-heading {
    display: block;
    width: 100%;
    margin: 0 0 22px;
    padding: 0;
    text-align: center;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-name {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--ep-step2-ink);
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(24px, 1.67vw, 32px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: center;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-detail-price {
    display: none !important;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-meta {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 100%;
    margin: 0;
    padding: 0;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-meta-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-meta-label,
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-meta-value {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: var(--ep-step2-ink);
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(16px, 1.04vw, 20px);
    font-weight: 500;
    line-height: 1.3;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-meta-value {
    color: #222222;
    text-align: right;
}

/* -------------------------------------------------------------------------
   Right panel shell and the shared three-step progress indicator.
   ------------------------------------------------------------------------- */
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-select-lenses-steps {
    display: flex;
    flex: 0 0 60%;
    flex-direction: column;
    width: 60%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--ep-step2-panel);
    box-sizing: border-box;
}

/* The approved Step 1 header has only the close X, not a back-arrow strip. */
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-steps-topbar {
    display: none !important;
}

/* jQuery shows the selected form with an inline display value. Target only
   that visible form so hidden prescription forms remain hidden. */
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form:not([style*="display: none"]) {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--ep-step2-panel);
    box-sizing: border-box;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-step-progress {
    position: relative;
    top: 8px;
    flex: 0 0 auto;
    min-height: 0;
    margin: 0;
    padding: clamp(34px, 4.8vh, 52px) clamp(24px, 2.14vw, 41px) 58px;
    background: transparent;
    box-sizing: border-box;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .steps-progress {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: calc(100% - 48px);
    max-width: none;
    min-height: 60px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .steps-progress::before,
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .steps-progress::after {
    position: absolute;
    top: 17px;
    left: 18px;
    right: 18px;
    width: auto;
    height: 2px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: var(--ep-step2-border);
    content: "";
    box-sizing: border-box;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .steps-progress::after {
    right: auto;
    width: calc(50% - 18px);
    background: var(--ep-step2-yellow);
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .step-point {
    position: relative;
    z-index: 3;
    display: flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--ep-step2-border);
    border-radius: 50%;
    background: var(--ep-step2-panel);
    color: var(--ep-step2-ink);
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    box-shadow: none;
    box-sizing: border-box;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .step-point.active,
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .step-point.completed {
    border-color: var(--ep-step2-yellow);
    background: var(--ep-step2-yellow);
    color: var(--ep-step2-ink);
    box-shadow: none;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .step-point.completed {
    color: transparent;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .step-point.completed::after {
    color: var(--ep-step2-ink);
    font-size: 14px;
    font-weight: 600;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .step-label {
    position: absolute;
    top: 44px;
    left: 50%;
    display: block;
    width: max-content;
    max-width: 180px;
    margin: 0;
    padding: 0;
    color: #222222;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(11px, 0.73vw, 14px);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
    text-align: center;
    white-space: nowrap;
    transform: translateX(-50%);
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .step-point.active .step-label,
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .step-point.completed .step-label {
    color: var(--ep-step2-ink);
    font-weight: 600;
}

/* Step 2 title: keep the text, align it and size it like the Step 1 heading. */
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form > h3,
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .readers-header > h3 {
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    padding: 0 clamp(24px, 2.14vw, 41px) 15px;
    color: #000000 !important;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif !important;
    font-size: clamp(18px, 1.5vw, 28px) !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    text-decoration: none !important;
    box-sizing: border-box;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .readers-header {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-sizing: border-box;
}

/* Keep the existing form content and its native scroll area intact. */
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-step-content {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0 clamp(24px, 2.14vw, 41px) 18px;
    overflow-x: hidden;
    overflow-y: auto;
    background: transparent;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c7c7c7 transparent;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-step-content::-webkit-scrollbar {
    width: 7px;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-step-content::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: #c7c7c7;
}

/* Preserve the existing bottom navigation and make Back visible now that
   the old top-left back-arrow strip is removed from the visual layout. */
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-navigation {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px clamp(24px, 2.14vw, 41px);
    border-top: 1px solid #dedede;
    background: #ffffff;
    box-sizing: border-box;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-navigation .ep-back-btn {
    display: inline-flex !important;
    min-height: 42px;
}

#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-navigation .ep-next-btn {
    min-height: 42px;
    margin-left: auto;
}

/* No underlines in the Step 2 shell or its form controls. */
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-info *,
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form,
#ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form * {
    text-decoration: none !important;
    text-decoration-line: none !important;
}

/* -------------------------------------------------------------------------
   Responsive layout: mirror Step 1 breakpoints and keep all controls usable.
   ------------------------------------------------------------------------- */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-info {
        flex-basis: 36%;
        width: 36%;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-select-lenses-steps {
        flex-basis: 64%;
        width: 64%;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-details {
        top: 67%;
        right: 20px;
        left: 20px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-heading {
        margin-bottom: 16px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-meta {
        gap: 12px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-step-progress {
        padding: 30px 20px 34px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form > h3,
    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .readers-header > h3 {
        padding: 0 20px 18px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-step-content {
        padding: 0 20px 20px;
    }
}

@media screen and (max-width: 768px) {
    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-modal-header {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-modal-container {
        flex-direction: column;
        height: 100%;
        min-height: 0;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-info {
        display: none;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-select-lenses-steps {
        flex: 1 1 100%;
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-step-progress {
        padding: 28px 18px 34px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .steps-progress {
        width: calc(100% - 12px);
        min-height: 56px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .step-point {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .steps-progress::before,
    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .steps-progress::after {
        top: 15px;
        left: 16px;
        right: 16px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .steps-progress::after {
        width: calc(50% - 16px);
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .step-label {
        top: 40px;
        font-size: 10px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form > h3,
    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .readers-header > h3 {
        padding: 0 18px 16px;
        font-size: 23px !important;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-step-content {
        padding: 0 18px 18px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-navigation {
        padding: 12px 18px;
    }
}

@media screen and (max-width: 420px) {
    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-step-progress {
        padding-right: 14px;
        padding-left: 14px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form > h3,
    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .readers-header > h3 {
        padding-right: 14px;
        padding-left: 14px;
        font-size: 21px !important;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-step-content {
        padding-right: 14px;
        padding-left: 14px;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .ep-navigation {
        padding-right: 14px;
        padding-left: 14px;
    }
}

@media screen and (min-width: 769px) and (max-height: 620px) {
    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-info {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 24px;
        padding: 32px 24px;
        overflow-y: auto;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-image,
    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-details {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        width: 100%;
        max-width: 669px;
        margin: 0 auto;
        transform: none;
    }

    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .ep-product-image {
        flex: 0 0 auto;
        max-height: 160px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .step-point,
    #ep-lens-modal:has(.prescription-form:not([style*="display: none"])) .prescription-form .steps-progress::after {
        transition: none;
    }
}


/* ========================================================================
   Step 2 Figma refresh - Single Vision / Progressive / Prescription Reading
   Readers and Non-Prescription are intentionally outside this scope.
   ======================================================================== */
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-layout-v2 {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    gap: 0;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    margin: 0 0 16px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-heading {
    min-width: 0;
    padding: 0;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-heading h3 {
    margin: 0 !important;
    padding: 0 !important;
    color: #000000 !important;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    text-decoration: none !important;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-help-link {
    display: inline-block;
    color: #1687c9;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none !important;
    cursor: default;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-method-card.ep-method-saved {
    display: inline-flex;
    flex: 0 1 270px;
    align-items: center;
    /* Center the history button against the single-line prescription title. */
    align-self: center;
    justify-content: center;
    gap: 12px;
    width: 270px;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    margin: 0;
    padding: 7px 12px;
    box-sizing: border-box;
    border: 1px solid #d8d8d8;
    border-radius: 0;
    background: #ffffff;
    color: #111111;
    box-shadow: none;
    transform: none;
    cursor: pointer;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-method-card.ep-method-saved:hover {
    border-color: #bcbcbc;
    background: #ffffff;
    box-shadow: none;
    transform: none;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-method-card.ep-method-saved .ep-method-icon {
    display: inline-flex;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #111111;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-method-card.ep-method-saved .ep-method-icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-method-card.ep-method-saved .ep-method-text {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-method-card.ep-method-saved .ep-method-title {
    display: block;
    margin: 0;
    color: #111111;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

/* The two method cards remain as invisible state controls for the existing
   validator. Their state is changed by the file picker/manual field events. */
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-method-card.ep-method-manual,
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-method-card.ep-method-upload {
    display: none !important;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-method-panel {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-method-panel.ep-panel-saved {
    margin: 0 0 14px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .saved-prescription-summary {
    width: 100%;
    max-width: none;
    margin: 0;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-entry-card {
    width: 100%;
    margin: 0;
    padding: clamp(18px, 2.4vw, 46px);
    border: 1px solid #d7d7d7;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-fields-wrap {
    width: 100%;
    margin: 0;
    padding: 0;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-eye-group {
    width: 100%;
    margin: 0;
    padding: 0;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-eye-group + .ep-prescription-eye-group {
    margin-top: 17px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-eye-title {
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    color: #111111 !important;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    text-transform: none !important;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-fields-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px clamp(12px, 2.4vw, 46px);
    width: 100%;
}

/* Figma-width Single Vision fields: three approximately 210.61px cards,
   separated by the existing desktop gaps.  Limit the grid rather than the
   selects so the original form controls and validation stay untouched.
   Progressive intentionally retains its existing four-column layout. */
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-layout-v2[data-suffix="sv"] .ep-prescription-fields-grid {
    --ep-sv-column-gap: clamp(12px, 2.4vw, 45px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--ep-sv-column-gap);
    max-width: calc(631.83px + var(--ep-sv-column-gap) + var(--ep-sv-column-gap));
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 1px solid #d5d5d5;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    box-sizing: border-box;
    cursor: pointer;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field-label {
    position: absolute;
    top: 6px;
    right: 30px;
    left: 9px;
    z-index: 1;
    display: block;
    margin: 0;
    color: #111111;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.15;
    pointer-events: none;
}

/* A single transparent native select covers the whole field. This removes
   the inner white select bar and makes every point in the field clickable. */
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field select {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding: 20px 30px 3px 9px;
    border: 0 !important;
    border-radius: 0;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent !important;
    background-image: none !important;
    color: #111111;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 19px;
    box-shadow: none !important;
    box-sizing: border-box;
    cursor: pointer;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field select::-ms-expand {
    display: none;
}

/* Custom arrow: vertically centered on the right edge of the full field. */
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field::after {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 3;
    width: 6px;
    height: 6px;
    border-right: 1px solid #7d8792;
    border-bottom: 1px solid #7d8792;
    content: "";
    pointer-events: none;
    transform: translateY(-50%) rotate(45deg);
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field select:focus {
    outline: 0;
    box-shadow: none !important;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field.ep-prescription-field-disabled {
    background: #f5f5f5;
    border-color: #e1e1e1;
    color: #888888;
    cursor: not-allowed;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field.ep-prescription-field-disabled .ep-prescription-field-label {
    color: #888888;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field.ep-prescription-field-disabled::after {
    border-color: #aeb4bb;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field.ep-prescription-field-disabled select:disabled {
    background-color: transparent;
    color: #929292 !important;
    -webkit-text-fill-color: #929292;
    cursor: not-allowed;
    opacity: 1;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-static-value {
    display: block;
    color: #888888;
    font-size: 12px;
    line-height: 19px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field-tips {
    margin: 8px 0 0;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field-tips .prescription-tip-cyl,
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field-tips .prescription-tip-add {
    display: none;
    margin: 5px 0 0;
    padding: 6px 9px;
    border-radius: 4px;
    font-size: 11px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-section-v2 {
    width: 100%;
    max-width: none;
    margin: 20px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-section-v2 h4 {
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    color: #111111 !important;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.25;
}

/* PD controls: retain all original input names/radio values and JS toggling.
   Flex ordering places the two-eye cards before the checkbox when expanded. */
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px 20px;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-state-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .single-pd-container {
    display: block;
    order: 1;
    flex: 0 1 262px;
    width: 262px;
    min-width: 0;
    max-width: 262px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

/* Use the same down-arrow asset as the SPH/CYL prescription selects.
   background-color (not background shorthand) preserves the arrow. */
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .single-pd-container select,
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container select {
    display: block;
    width: 100%;
    height: 46px;
    min-height: 46px;
    margin: 0;
    padding: 0 32px 0 12px;
    border: 1px solid #d5d5d5 !important;
    border-radius: 0;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%236b7280' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color: #333333;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    box-sizing: border-box;
    box-shadow: none !important;
    cursor: pointer;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-two-toggle {
    display: inline-flex;
    order: 2;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #222222;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-two-toggle input[type="checkbox"] {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin: 0;
    padding: 0;
    border: 1px solid #c9c9c9;
    border-radius: 0;
    background: #ffffff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
    cursor: pointer;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-two-toggle input[type="checkbox"]:checked {
    border-color: #109cf0;
    background-color: #109cf0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m5 12 4.5 4.5L19 7' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 17px 17px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-two-toggle input[type="checkbox"]:focus-visible {
    outline: 2px solid #147e9e;
    outline-offset: 2px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container {
    display: none;
    order: 1;
    flex: 0 1 460px;
    width: 460px;
    min-width: min(100%, 360px);
    max-width: 460px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 3vw, 46px);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-sizing: border-box;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container > div {
    display: flex;
    flex: initial;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 4px;
    width: 100%;
    min-width: 0;
    height: 80px;
    margin: 0;
    padding: 11px 10px 8px;
    border: 1px solid #d5d5d5;
    border-radius: 0;
    background: #ffffff;
    box-sizing: border-box;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container label {
    display: block;
    min-width: 0;
    margin: 0;
    color: #111111;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    white-space: nowrap;
    cursor: pointer;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container select {
    flex: 0 0 26px;
    height: 26px;
    min-height: 26px;
    padding: 0 28px 0 0;
    border: 0 !important;
    outline: 0;
    background-color: transparent;
    background-position: right 0 center;
    font-size: 14px;
    line-height: 26px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container > div:focus-within {
    border-color: #147e9e;
    box-shadow: 0 0 0 1px rgba(20, 126, 158, 0.12);
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container select:focus {
    outline: 0;
    box-shadow: none !important;
}

/* Expanded two-number PD: give both eye cards the available horizontal room.
   Keep the checkbox to their right on desktop; only the presentation changes. */
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2:has(.ep-pd-two-toggle-input:checked) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    column-gap: 12px;
    max-width: 800px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2:has(.ep-pd-two-toggle-input:checked) .dual-pd-container {
    grid-column: 1;
    grid-row: 1;
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    gap: 14px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2:has(.ep-pd-two-toggle-input:checked) .ep-pd-two-toggle {
    grid-column: 2;
    grid-row: 1;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-section-v2 .pd-tip {
    display: none;
    margin: 6px 0 0;
    padding: 0;
    color: #b42318;
    background: transparent;
    border: 0;
    font-size: 11px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-step-two-upload-section {
    width: 100%;
    max-width: none;
    margin: 22px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-step-two-section-title {
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: #111111 !important;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-upload-dropzone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 110px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px dashed #d4d4d4;
    border-radius: 12px;
    background: #ffffff;
    box-sizing: border-box;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-upload-dropzone .prescription-file-input {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 16px;
    color: #999999;
    text-align: center;
    pointer-events: none;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-upload-prompt svg {
    display: block;
    width: 26px;
    height: 26px;
    color: #222222;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-upload-prompt span {
    color: #999999;
    font-size: 11px;
    line-height: 1.35;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-upload-prompt small {
    color: #aaaaaa;
    font-size: 10px;
    line-height: 1.3;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-upload-dropzone .prescription-file-preview {
    position: absolute;
    z-index: 3;
    inset: 6px;
    display: none;
    max-width: none;
    margin: 0;
    padding: 0;
    background: #ffffff;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-upload-dropzone:has(.prescription-file-preview:not(:empty)) .ep-upload-prompt {
    opacity: 0;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-upload-dropzone .prescription-file-preview {
    pointer-events: none;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-upload-dropzone .prescription-file-preview a,
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-upload-dropzone .prescription-file-preview button {
    pointer-events: auto;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-step-two-note-section {
    width: 100%;
    max-width: none;
    margin: 18px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-step-two-note-label {
    margin: 0 0 10px;
    padding: 0;
    color: #111111;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-step-two-note-section .user-note-field {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-step-two-note-section .user-note-textarea {
    display: block;
    width: 100%;
    min-height: 36px;
    height: 36px;
    margin: 0;
    padding: 9px 10px;
    border: 1px solid #d5d5d5;
    border-radius: 0;
    background: #ffffff;
    color: #222222;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 11px;
    line-height: 1.4;
    resize: vertical;
    box-sizing: border-box;
    box-shadow: none;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-step-two-note-section .user-note-textarea::placeholder {
    color: #aaaaaa;
}

@media screen and (max-width: 1024px) {
    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-entry-card {
        padding: 20px;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-fields-grid {
        gap: 12px;
    }
}

@media screen and (max-width: 768px) {
    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 14px;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-heading h3 {
        font-size: 18px !important;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-method-card.ep-method-saved {
        flex: 0 0 auto;
        align-self: flex-start;
        width: auto;
        max-width: 100%;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-entry-card {
        padding: 16px;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-fields-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-layout-v2[data-suffix="sv"] .ep-prescription-fields-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 10px;
        max-width: 431.22px; /* Two Figma-width cards plus the compact gap. */
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 {
        gap: 12px;
    }

    /* On compact screens, cards use the full row and the toggle follows below. */
    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2:has(.ep-pd-two-toggle-input:checked) {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 12px;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2:has(.ep-pd-two-toggle-input:checked) .ep-pd-two-toggle {
        grid-column: 1;
        grid-row: 2;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        max-width: 460px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-upload-dropzone {
        min-height: 104px;
    }
}

@media screen and (max-width: 420px) {
    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-fields-grid {
        gap: 8px;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-entry-card {
        padding: 12px;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-field {
        padding: 0;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container {
        gap: 10px;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container > div {
        padding: 10px 8px 8px;
    }

    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container label {
        font-size: 11px;
    }
}

/* Readers Step 2 Figma layout; scoped to Readers only. */
#readers-prescription .readers-header{margin:22px 0 0!important;padding:0 0 10px!important;border-bottom:0}
#readers-prescription .readers-header>h3{margin:0!important;text-align:left!important;font-size:17px!important;font-weight:650!important;color:#171717}
#readers-prescription .readers-step-content{padding-top:9px!important;margin-top:0!important}
#readers-prescription .readers-sub-title{margin:0 0 21px!important;text-align:left!important;font-size:12px!important;font-weight:400!important;color:#252525!important}
#readers-prescription .readers-options{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:38px!important;margin:0 0 20px!important}
#readers-prescription .reader-option{box-sizing:border-box;width:100%;min-width:0;height:46px!important;padding:0 5px;border:1px solid #dedede;border-radius:6px!important;background:#fff;color:#171717;font:inherit;font-size:13px!important;font-weight:400!important;box-shadow:0 2px 3px rgba(0,0,0,.15);transform:none;cursor:pointer}
#readers-prescription .reader-option:hover{background:#fff9dc;border-color:#e3bd00;transform:none}
#readers-prescription .reader-option.selected{background:#ffcf00!important;border-color:#e2b900!important;color:#111!important;font-weight:600!important;box-shadow:0 2px 5px rgba(0,0,0,.14)}
#readers-prescription .reader-option:focus-visible{outline:2px solid #1e7490;outline-offset:2px}
@media(max-width:560px){#readers-prescription .readers-options{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:38px!important}}
@media(max-width:350px){#readers-prescription .readers-options{grid-template-columns:repeat(2,minmax(0,1fr))!important}}


/* Readers Step 2: precise Figma composition; override shared modal typography. */
#ep-lens-modal #readers-prescription .readers-header{
  margin:24px 0 0!important;padding:0 22px!important;border:0!important;
}
#ep-lens-modal #readers-prescription .readers-header>h3{
  box-sizing:border-box!important;margin:0!important;padding:0 0 10px!important;
  width:100%!important;font-size:17px!important;line-height:1.35!important;
  font-weight:600!important;border-bottom:0!important;
}
#ep-lens-modal #readers-prescription .readers-step-content{
  padding:9px 22px 22px!important;margin:0!important;overflow-y:auto;
}
#ep-lens-modal #readers-prescription .readers-sub-title{
  margin:0 0 21px!important;font-size:12px!important;line-height:1.5!important;
}
#ep-lens-modal #readers-prescription .readers-options{
  display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:38px!important;margin:0 0 19px!important;
}
#ep-lens-modal #readers-prescription .reader-option{
  height:46px!important;border-radius:6px!important;
}
#ep-lens-modal #readers-prescription .ep-step-two-note-section{
  display:block!important;width:100%!important;max-width:none!important;
  margin:0!important;padding:0!important;border:0!important;
  border-radius:0!important;background:transparent!important;box-shadow:none!important;
}
#ep-lens-modal #readers-prescription .ep-step-two-note-label{
  display:block!important;margin:0 0 11px!important;padding:0!important;
  font-size:12px!important;line-height:1.5!important;font-weight:600!important;
  color:#171717!important;
}
#ep-lens-modal #readers-prescription .ep-step-two-note-section .user-note-field{
  display:block!important;margin:0!important;padding:0!important;
}
#ep-lens-modal #readers-prescription .ep-step-two-note-section .user-note-textarea{
  display:block!important;box-sizing:border-box!important;width:100%!important;
  min-height:35px!important;height:35px!important;padding:10px!important;
  border:1px solid #d6d6d6!important;border-radius:0!important;
  background:#fff!important;box-shadow:none!important;resize:vertical!important;
  font-size:11px!important;line-height:14px!important;
}
@media(max-width:560px){
 #ep-lens-modal #readers-prescription .readers-options{
   grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:38px!important;
 }
}


/* Readers Step 2 heading: match the Single Vision / Progressive / Prescription Reading typography. */
#ep-lens-modal #readers-prescription .readers-header {
    box-sizing: border-box !important;
    margin: 24px 0 0 !important;
    padding: 0 22px !important;
    border: 0 !important;
    background: transparent !important;
}
#ep-lens-modal #readers-prescription .readers-header > h3 {
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    color: #000 !important;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    text-decoration: none !important;
}
#ep-lens-modal #readers-prescription .readers-step-content {
    padding-top: 16px !important;
}
@media (max-width: 768px) {
    #ep-lens-modal #readers-prescription .readers-header > h3 {
        font-size: 18px !important;
    }
}

/* Readers / Figma refinement — title uses the same left inset as other Step 2 forms. */
#ep-lens-modal:has(#readers-prescription:not([style*="display: none"])) #readers-prescription .readers-header {
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    box-sizing:border-box!important;
}
#ep-lens-modal:has(#readers-prescription:not([style*="display: none"])) #readers-prescription .readers-header > h3 {
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:0 clamp(24px,2.14vw,41px) 15px!important;
    border:0!important;
    font-family:Inter,"Helvetica Neue",Arial,sans-serif!important;
    font-size:clamp(18px,1.5vw,28px)!important;
    font-weight:600!important;
    line-height:1.25!important;
    text-align:left!important;
    color:#000!important;
}
#ep-lens-modal:has(#readers-prescription:not([style*="display: none"])) #readers-prescription .readers-step-content {
    margin:0!important;
    padding:0 clamp(24px,2.14vw,41px) 24px!important;
}
#ep-lens-modal:has(#readers-prescription:not([style*="display: none"])) #readers-prescription .readers-sub-title {
    margin:0 0 20px!important;
    font-family:Inter,"Helvetica Neue",Arial,sans-serif!important;
    font-size:clamp(13px,1.15vw,20px)!important;
    font-weight:400!important;
    line-height:1.45!important;
    text-align:left!important;
}
#ep-lens-modal:has(#readers-prescription:not([style*="display: none"])) #readers-prescription .reader-option {
    height:clamp(46px,4.5vw,80px)!important;
    font-size:clamp(13px,1.3vw,22px)!important;
    border-radius:10px!important;
    box-shadow:0 4px 6px #cccccc!important;
}
#ep-lens-modal:has(#readers-prescription:not([style*="display: none"])) #readers-prescription .ep-step-two-note-label {
    font-size:clamp(13px,1.15vw,20px)!important;
    font-weight:600!important;
}
#ep-lens-modal:has(#readers-prescription:not([style*="display: none"])) #readers-prescription .ep-step-two-note-section .user-note-textarea {
    min-height:clamp(36px,3.5vw,61px)!important;
    height:clamp(36px,3.5vw,61px)!important;
    font-size:14px!important;
}
@media(max-width:768px){
 #ep-lens-modal:has(#readers-prescription:not([style*="display: none"])) #readers-prescription .readers-header > h3{
    padding:0 20px 12px!important;
 }
 #ep-lens-modal:has(#readers-prescription:not([style*="display: none"])) #readers-prescription .readers-step-content{
    padding:0 20px 20px!important;
 }
}

/* Readers note input: match the other three prescription Step 2 forms. */
#ep-lens-modal #readers-prescription .ep-step-two-note-section .user-note-textarea,
#ep-lens-modal:has(#readers-prescription:not([style*="display: none"])) #readers-prescription .ep-step-two-note-section .user-note-textarea {
    display: block !important;
    width: 100% !important;
    min-height: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 9px 10px !important;
    border: 1px solid #d5d5d5 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #222222 !important;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    resize: vertical !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

/* Extremely narrow screens: keep the eye labels readable without clipping. */
@media screen and (max-width: 350px) {
    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* Step 2 confirmation: compact acknowledgement above the upload area.
   Readers has no upload section; its checkbox sits above the note field. */
#ep-lens-modal .ep-prescription-confirm {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    max-width: 100%;
    margin: 18px 0 0;
    padding: 0;
    color: #222222;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    cursor: pointer;
}
#ep-lens-modal .ep-prescription-confirm .ep-prescription-confirm-input {
    display: block;
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin: 0;
    padding: 0;
    accent-color: #148dc3;
    cursor: pointer;
}
#ep-lens-modal .ep-prescription-confirm .ep-prescription-confirm-input:focus-visible {
    outline: 2px solid #148dc3;
    outline-offset: 3px;
}
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-panel-upload .ep-step-two-upload-section {
    margin-top: 14px;
}
#ep-lens-modal #readers-prescription .ep-prescription-confirm {
    display: flex;
    width: fit-content;
    margin: 0 0 18px;
}
@media screen and (min-width: 769px) and (max-width: 980px) {
    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-header {
        flex-wrap: wrap;
    }
}


/* Readers Step 2: independent OD/OS diopters + the shared single/dual PD.
   Scoped to Readers only; Single Vision and Progressive remain unchanged. */
#ep-lens-modal #readers-prescription .ep-readers-strength-section {
    margin: 0 0 55px;
    padding: 0;
}
#ep-lens-modal #readers-prescription .ep-readers-section-title {
    margin: 0 0 20px !important;
    padding: 0 !important;
    color: #151515 !important;
    font: 600 clamp(15px, 1.2vw, 18px)/1.35 Inter, "Helvetica Neue", Arial, sans-serif !important;
    text-align: left !important;
}
#ep-lens-modal #readers-prescription .ep-readers-eye-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 182px));
    align-items: start;
    gap: 24px;
    max-width: 100%;
}
#ep-lens-modal #readers-prescription .ep-readers-eye-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    min-width: 0;
    margin: 0;
    color: #171717;
    font: 500 clamp(14px, 1.2vw, 18px)/1.4 Inter, "Helvetica Neue", Arial, sans-serif;
}
#ep-lens-modal #readers-prescription .ep-readers-eye-field > span {
    display: block;
    white-space: nowrap;
}
#ep-lens-modal #readers-prescription .ep-readers-eye-field select.ep-reader-strength-select {
    display: block !important;
    width: 100% !important;
    height: 70px !important;
    min-height: 70px !important;
    padding: 0 42px 0 15px !important;
    margin: 0 !important;
    border: 1px solid #d8d8d8 !important;
    border-radius: 10px !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232f3740' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 17px 17px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-shadow: 0 3px 5px rgba(0,0,0,.16) !important;
    color: #151515 !important;
    font: 400 16px/1.35 Inter, "Helvetica Neue", Arial, sans-serif !important;
    box-sizing: border-box !important;
    cursor: pointer;
}
#ep-lens-modal #readers-prescription .ep-readers-eye-field select.ep-reader-strength-select:focus-visible {
    outline: 2px solid #167d9a !important;
    outline-offset: 2px;
}
#ep-lens-modal #readers-prescription .ep-readers-pd-block {
    margin: 0 0 32px;
}
/* Reuse the same PD width as Single Vision and Progressive; customize placement only. */
#ep-lens-modal #readers-prescription .ep-readers-pd-block .ep-pd-section-v2 {
    margin-top: 0;
}
#ep-lens-modal #readers-prescription .ep-readers-pd-block .ep-pd-section-v2 h4 {
    margin-bottom: 20px !important;
    text-align: left !important;
}
@media (max-width: 520px) {
    #ep-lens-modal #readers-prescription .ep-readers-eye-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
    #ep-lens-modal #readers-prescription .ep-readers-eye-field {
        gap: 10px;
        font-size: 13px;
    }
    #ep-lens-modal #readers-prescription .ep-readers-eye-field > span {
        white-space: normal;
    }
    #ep-lens-modal #readers-prescription .ep-readers-eye-field select.ep-reader-strength-select {
        height: 58px !important;
        min-height: 58px !important;
        padding-left: 10px !important;
        font-size: 14px !important;
    }
    #ep-lens-modal #readers-prescription .ep-readers-strength-section {
        margin-bottom: 32px;
    }
    #ep-lens-modal #readers-prescription .ep-readers-pd-block {
        margin-bottom: 22px;
    }
}


/* Email Later: a simple optional checkbox immediately above the note field. */
#ep-lens-modal .ep-email-later-section {
    display: block;
    margin: 16px 0 0;
    padding: 0;
}
#ep-lens-modal .ep-email-later-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    max-width: 100%;
    margin: 0;
    padding: 0;
    color: #222222;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    cursor: pointer;
}
#ep-lens-modal .ep-email-later-checkbox {
    display: block;
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin: 0;
    padding: 0;
    accent-color: #1f79ff;
    cursor: pointer;
}
#ep-lens-modal .ep-email-later-checkbox:focus-visible {
    outline: 2px solid #1f79ff;
    outline-offset: 3px;
}
#ep-lens-modal #readers-prescription .ep-email-later-section {
    margin: 0;
}
#ep-lens-modal #readers-prescription .ep-email-later-section + .ep-step-two-note-section {
    margin-top: 18px !important;
}

/* -------------------------------------------------------------------------
   Step 2 - three equally prominent prescription methods (Nov 2026).
   Only the Single Vision / Progressive / legacy Rx-reading accordion is
   changed; Readers keeps its independent strengths + PD interface.
   ------------------------------------------------------------------------- */
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion {
    display: block;
    width: 100%;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-prescription-header {
    margin-bottom: 24px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-option {
    display: block;
    width: 100%;
    margin: 0 0 18px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d0d0d0;
    border-radius: 17px;
    background: #ffffff;
    box-shadow: 0 3px 4px rgba(0,0,0,.13);
    box-sizing: border-box;
}

/* Higher specificity intentionally restores the once-hidden method cards. */
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-card.ep-method-manual,
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-card.ep-method-upload,
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-card.ep-method-later {
    display: flex !important;
    align-items: center;
    width: 100%;
    min-height: 55px;
    gap: 18px;
    margin: 0;
    padding: 12px 25px 12px 42px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    outline-offset: -3px;
    transform: none;
    color: #101010;
    cursor: pointer;
    box-sizing: border-box;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-card:hover {
    background: #fbfbfb;
    border-color: transparent;
    box-shadow: none;
    transform: none;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-card.active {
    border: 0;
    background: #ffffff;
    box-shadow: none;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-card:focus-visible {
    outline: 2px solid #1f79ff;
    outline-offset: -3px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-option .ep-method-title {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #101010;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(13px, 1vw, 16px);
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-inline-icon {
    display: inline-flex;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    color: #121212;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-chevron {
    display: inline-flex;
    flex: 0 0 23px;
    align-items: center;
    justify-content: center;
    color: #161616;
    transition: transform .2s ease;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-card[aria-expanded="true"] .ep-method-chevron {
    transform: rotate(90deg);
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-panel-manual,
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-panel-upload {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border: 0;
    box-sizing: border-box;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-panel-manual .ep-prescription-entry-card {
    padding: 12px clamp(20px, 4vw, 55px) 24px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-panel-manual .ep-prescription-confirm {
    display: flex;
    width: 100%;
    margin: 25px 0 0;
    font-size: 12px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-required-mark,
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-upload-advice span {
    color: #1f79ff;
    font-style: normal;
    font-weight: 600;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-panel-upload {
    padding: 0 clamp(20px, 4vw, 55px) 18px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-panel-upload .ep-step-two-upload-section {
    margin: 0;
    padding: 0;
}

/* The button already says Upload Prescription; do not repeat the heading. */
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-panel-upload .ep-step-two-section-title {
    display: none !important;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-panel-upload .ep-upload-dropzone {
    min-height: 98px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-panel-upload .ep-upload-advice {
    margin: 10px 0 0;
    padding: 0;
    color: #282828;
    font: 400 11px/1.5 Inter, "Helvetica Neue", Arial, sans-serif;
}

/* The user chooses the Email Later card instead of a separate checkbox. */
#ep-lens-modal .ep-prescription-accordion .ep-email-later-checkbox {
    display: none !important;
}

@media screen and (max-width: 768px) {
    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-card.ep-method-manual,
    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-card.ep-method-upload,
    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-card.ep-method-later {
        padding: 12px 15px;
        min-height: 54px;
        gap: 11px;
    }
    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-panel-manual .ep-prescription-entry-card,
    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-panel-upload {
        padding-left: 16px;
        padding-right: 16px;
    }
    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-option {
        margin-bottom: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-method-chevron {
        transition: none;
    }
}

/* The upload choice itself supplies the action label; its expanded area is
   the quiet dashed drop zone shown in the supplied reference. */
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-prescription-accordion .ep-panel-upload .ep-upload-prompt {
    display: none;
}

/* Back is sentence case in every ASEP step, regardless of the theme's
   text-transform rules. This stylesheet is cache-busted by filemtime. */
#ep-lens-modal .ep-navigation button.ep-back-btn,
#ep-lens-modal .ep-step .ep-navigation .ep-back-btn {
    text-transform: none !important;
    font-variant-caps: normal !important;
}

/* Step 2 acknowledgement reminder: appears only after a complete manual Rx
   (or imported manual history) and disappears immediately on confirmation. */
#ep-lens-modal .ep-prescription-confirm-reminder {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    max-width: min(100%, 440px);
    margin: 10px 0 5px 0;
    padding: 10px 12px;
    box-sizing: border-box;
    color: #303030;
    background: #ffffff;
    border: 1px solid #c8c8c8;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .14);
    font: 400 13px/1.45 Inter, "Helvetica Neue", Arial, sans-serif;
    text-align: left;
}
#ep-lens-modal .ep-prescription-confirm-reminder::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 14px;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-left: 1px solid #c8c8c8;
    border-top: 1px solid #c8c8c8;
    transform: rotate(45deg);
}
#ep-lens-modal .ep-prescription-confirm-reminder .ep-confirm-reminder-icon {
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    color: #ffffff;
    background: #e07820;
    font: 700 13px/1 Inter, Arial, sans-serif;
}
#ep-lens-modal .ep-prescription-confirm-reminder .ep-confirm-reminder-text {
    min-width: 0;
}

/* PD dropdown arrows and dual-PD hit areas: visually match the SPH/CYL/AXIS/ADD fields.
   Single PD keeps its existing bordered select field; only its arrow changes.
   Dual PD keeps each eye card, while the native select transparently covers the
   complete card so clicking the label, value area, or arrow opens the dropdown. */
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .single-pd-container {
    position: relative;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .single-pd-container select {
    background-image: none !important;
    background-position: initial;
    padding-right: 32px;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .single-pd-container::after,
#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container > div::after {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 3;
    width: 6px;
    height: 6px;
    border-right: 1px solid #7d8792;
    border-bottom: 1px solid #7d8792;
    content: "";
    pointer-events: none;
    transform: translateY(-50%) rotate(45deg);
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container > div {
    position: relative;
    cursor: pointer;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container label {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container select {
    position: absolute;
    inset: -1px;
    z-index: 2;
    display: block;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 43px 32px 7px 10px;
    border: 0 !important;
    border-radius: 0;
    outline: 0;
    background-color: transparent !important;
    background-image: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color: #333333;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 19px;
    box-shadow: none !important;
    box-sizing: border-box;
    cursor: pointer;
}

#ep-lens-modal:has(.ep-prescription-layout-v2) .ep-pd-values-v2 .dual-pd-container select:focus {
    outline: 0;
    box-shadow: none !important;
}

