@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/**
 * ASEP - Step 1: Choose Prescription Type
 * Figma reference: 1920 x 1080.
 * Desktop split: product panel 40%, prescription panel 60%.
 * This stylesheet is intentionally scoped to Step 1 so later steps keep
 * their existing presentation and behavior.
 */

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) {
    --ep-step1-panel: #f7f7f7;
    --ep-step1-white: #ffffff;
    --ep-step1-ink: #111111;
    --ep-step1-muted: #5b5b5b;
    --ep-step1-border: #cccccc;
    --ep-step1-yellow: #ffd600;
}

#ep-lens-modal:has(#step1-choose-prescription-type: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-size: 20px;
    font-weight: 400;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-close:hover {
    background: transparent;
    color: #111111;
}

#ep-lens-modal:has(#step1-choose-prescription-type: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-step1-white);
}

/* Keep the page behind the full-screen configurator from creating a second scrollbar. */
html:has(body.modal-open) {
    overflow: hidden !important;
}

body.modal-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

/* -------------------------------------------------------------------------
   Left panel: product image and product attributes
   ------------------------------------------------------------------------- */
#ep-lens-modal:has(#step1-choose-prescription-type: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-step1-white);
    box-sizing: border-box;
}

/* The product image is centered in the panel, independently of the details below. */
#ep-lens-modal:has(#step1-choose-prescription-type: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(#step1-choose-prescription-type: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(#step1-choose-prescription-type: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(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-heading {
    display: block;
    width: 100%;
    margin: 0 0 22px;
    padding: 0;
    text-align: center;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-name {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--ep-step1-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;
}

/* The Figma Step 1 reference does not show a separate product price. */
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-detail-price {
    display: none !important;
}

/* Each product attribute is a single horizontal label/value row. */
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-meta {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 100%;
    margin: 0;
    padding: 0;
}

#ep-lens-modal:has(#step1-choose-prescription-type: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(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-meta-label,
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-meta-value {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: var(--ep-step1-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(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-meta-value {
    color: #222222;
    text-align: right;
}

/* -------------------------------------------------------------------------
   Right panel: progress, title and prescription type cards
   ------------------------------------------------------------------------- */
#ep-lens-modal:has(#step1-choose-prescription-type: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-step1-panel);
    box-sizing: border-box;
}


#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--ep-step1-panel);
    box-sizing: border-box;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-progress {
    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(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .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(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .steps-progress::before,
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .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-step1-border);
    content: "";
    box-sizing: border-box;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .steps-progress::after {
    right: auto;
    width: 0;
    background: var(--ep-step1-border);
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .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-step1-border);
    border-radius: 50%;
    background: var(--ep-step1-panel);
    color: var(--ep-step1-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(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .step-point.active {
    border-color: var(--ep-step1-yellow);
    background: var(--ep-step1-yellow);
    color: var(--ep-step1-ink);
    box-shadow: none;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .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(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .step-point.active .step-label {
    color: var(--ep-step1-ink);
    font-weight: 600;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type > 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: 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(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-content {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0 clamp(24px, 2.14vw, 41px) 12px;
    overflow-x: hidden;
    overflow-y: hidden;
    background: transparent;
    box-sizing: border-box;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-type-options {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2.8vh, 30px);
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option,
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-prescription-option-static {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 30px;
    width: 100%;
    min-width: 0;
    min-height: clamp(80px, 9.54vh, 103px);
    height: auto;
    margin: 0;
    padding: 18px 52px 18px 20px;
    border: 1px solid var(--ep-step1-border);
    border-radius: 20px;
    background: var(--ep-step1-white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    color: var(--ep-step1-ink);
    text-align: left;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option {
    cursor: pointer;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option:hover {
    border-color: #d4b400;
    background: #fffef6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option.selected {
    border-color: #e0bd00;
    background: #fffdf2;
    box-shadow: inset 3px 0 0 var(--ep-step1-yellow), 0 0 0 2px rgba(255, 214, 0, 0.16);
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-icon {
    display: inline-flex;
    flex: 0 0 clamp(54px, 3.9vw, 75px);
    align-items: center;
    justify-content: center;
    width: clamp(54px, 3.9vw, 75px);
    height: clamp(48px, 6.02vh, 65px);
    margin: 0;
    padding: 0;
    border: 1px solid #e4ebeb;
    border-radius: 11px;
    background: #f2f5f5;
    color: #155e75;
    overflow: hidden;
    box-sizing: border-box;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

/* Original inline SVG sizing retained for backward compatibility. */
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-icon svg {
    display: block !important;
    flex: 0 0 auto;
    width: 72%;
    height: 72%;
    max-width: 46px;
    max-height: 46px;
    overflow: visible;
    color: inherit;
}


/* The four user-supplied prescription icons. Only their artwork changes. */
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-icon img.ep-prescription-icon-image {
    display: block;
    flex: 0 0 auto;
    width: 72%;
    height: 72%;
    max-width: 46px;
    max-height: 46px;
    object-fit: contain;
    object-position: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option:hover .prescription-option-icon,
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option.selected .prescription-option-icon {
    border-color: #ead46a;
    background: #fff9dc;
    color: #155e75;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    margin: 0;
    padding: 0;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-title {
    display: block;
    margin: 0;
    padding: 0;
    color: var(--ep-step1-ink);
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(16px, 1.04vw, 20px);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
    text-decoration: none !important;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-desc {
    display: block;
    margin: 0;
    padding: 0;
    color: var(--ep-step1-muted);
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(14px, 0.94vw, 18px);
    font-weight: 400;
    line-height: 1.35;
    text-decoration: none !important;
}

/* The last card is deliberately static for now, but keeps the same Figma arrow. */
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option::after,
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-prescription-option-static::after {
    position: absolute;
    top: 50%;
    right: 42px;
    display: block;
    margin: 0;
    padding: 0;
    color: #222222;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    content: "›";
    transform: translateY(-50%);
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-prescription-option-static {
    cursor: default;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-prescription-option-static:hover {
    border-color: var(--ep-step1-border);
    background: var(--ep-step1-white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transform: none;
}

#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option:focus-visible {
    outline: 2px solid #b89a00;
    outline-offset: 3px;
}

/* No text in this screen should inherit underline decoration from the theme. */
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-info *,
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type,
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type * {
    text-decoration: none !important;
    text-decoration-line: none !important;
}

/* -------------------------------------------------------------------------
   Responsive adjustments
   ------------------------------------------------------------------------- */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-info {
        flex-basis: 36%;
        width: 36%;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-select-lenses-steps {
        flex-basis: 64%;
        width: 64%;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-details {
        top: 67%;
        right: 20px;
        left: 20px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-heading {
        margin-bottom: 16px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-meta {
        gap: 12px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-progress {
        padding: 30px 20px 34px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type > h3 {
        padding: 0 20px 18px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-content {
        padding: 0 20px 24px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-type-options {
        gap: 14px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option,
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-prescription-option-static {
        gap: 14px;
        padding: 12px 42px 12px 14px;
        border-radius: 16px;
    }
}

@media screen and (max-width: 768px) {
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-modal-container {
        flex-direction: column;
        height: 100%;
        min-height: 0;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-info {
        display: none;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) .ep-select-lenses-steps {
        flex: 1 1 100%;
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-progress {
        padding: 28px 18px 34px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .steps-progress {
        width: calc(100% - 12px);
        min-height: 56px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .step-point {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .steps-progress::before,
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .steps-progress::after {
        top: 15px;
        left: 16px;
        right: 16px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .step-label {
        top: 40px;
        font-size: 10px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type > h3 {
        padding: 0 18px 18px;
        color: #000000 !important;
        font-family: Inter, "Helvetica Neue", Arial, sans-serif !important;
        font-size: 23px !important;
        font-weight: 600 !important;
        line-height: 1.25 !important;
        letter-spacing: 0 !important;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-content {
        padding: 0 18px 24px;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-type-options {
        gap: 12px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option,
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-prescription-option-static {
        min-height: 78px;
        gap: 12px;
        padding: 11px 38px 11px 12px;
        border-radius: 14px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option::after,
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-prescription-option-static::after {
        right: 18px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-icon {
        flex-basis: 52px;
        width: 52px;
        height: 48px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-title {
        font-size: 15px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-desc {
        font-size: 13px;
    }
}

@media screen and (max-width: 420px) {
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-progress {
        padding-right: 14px;
        padding-left: 14px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type > h3 {
        padding-right: 14px;
        padding-left: 14px;
        font-size: 21px !important;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-content {
        padding-right: 14px;
        padding-left: 14px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option,
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-prescription-option-static {
        gap: 10px;
        padding-right: 34px;
        padding-left: 10px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-icon {
        flex-basis: 46px;
        width: 46px;
        height: 44px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-title {
        font-size: 14px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-desc {
        font-size: 12px;
    }
}

/* On short desktop viewports, allow the product panel to scroll naturally. */
@media screen and (min-width: 769px) and (max-height: 620px) {
    #ep-lens-modal:has(#step1-choose-prescription-type: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(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-image,
    #ep-lens-modal:has(#step1-choose-prescription-type: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(#step1-choose-prescription-type:not([style*="display: none"])) .ep-product-image {
        flex: 0 0 auto;
        max-height: 160px;
    }
}


/* -------------------------------------------------------------------------
   Desktop height fit: keep all six Step 1 options visible without an inner
   scrollbar. The 850px reference viewport uses slightly tighter card gaps.
   ------------------------------------------------------------------------- */
@media screen and (min-width: 769px) and (max-height: 900px) {
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-progress {
        padding-bottom: clamp(34px, 6vh, 52px);
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type > h3 {
        padding-bottom: clamp(10px, 1.6vh, 14px);
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-content {
        padding-bottom: clamp(8px, 1.4vh, 12px);
        overflow: hidden;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-type-options {
        gap: clamp(12px, 2.3vh, 20px);
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option,
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-prescription-option-static {
        min-height: clamp(76px, 10.2vh, 92px);
        padding-top: clamp(12px, 1.8vh, 16px);
        padding-bottom: clamp(12px, 1.8vh, 16px);
    }
}

/* Short desktop windows: compact the progress/header and card rhythm further. */
@media screen and (min-width: 769px) and (max-height: 800px) {
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-progress {
        padding-top: clamp(24px, 4.4vh, 34px);
        padding-bottom: clamp(20px, 3.5vh, 28px);
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-content {
        padding-bottom: 10px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-type-options {
        gap: clamp(10px, 1.6vh, 14px);
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option,
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-prescription-option-static {
        min-height: clamp(70px, 9.8vh, 80px);
        padding-top: clamp(10px, 1.5vh, 12px);
        padding-bottom: clamp(10px, 1.5vh, 12px);
    }
}

/* Very short desktop windows need smaller type/card padding to keep every item visible. */
@media screen and (min-width: 769px) and (max-height: 650px) and (min-height: 541px) {
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-progress {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type > h3 {
        padding-bottom: 8px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-content {
        padding-bottom: 8px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-type-options {
        gap: 8px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option,
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-prescription-option-static {
        min-height: 64px;
        gap: 14px;
        padding: 8px 42px 8px 14px;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-title {
        font-size: 16px;
        line-height: 1.2;
    }

    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option-desc {
        font-size: 14px;
        line-height: 1.25;
    }
}

/* Below 580px of desktop height, preserve access rather than clipping content. */
@media screen and (min-width: 769px) and (max-height: 580px) {
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (prefers-reduced-motion: reduce) {
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .prescription-option,
    #ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .step-point {
        transition: none;
    }
}

/* Step 1 refinement: move the complete progress indicator down slightly
   without changing the title, card positions, or available layout height. */
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-progress {
    position: relative;
    top: 8px;
}

/* Five Step 1 cards: allow scrolling only when the viewport cannot fit all
   cards; do not shrink the approved card typography or image assets. */
#ep-lens-modal:has(#step1-choose-prescription-type:not([style*="display: none"])) #step1-choose-prescription-type .ep-step-content {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}
