/*
 * Engage Global (app id 1646067161) — product detail page purchase option tiles.
 * Loaded only from basic/engage-global/pro_subs_tiles.blade.php, which itself
 * renders only for that tenant. Every selector is namespaced under .eg-purchase-box.
 */

.eg-purchase-box {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.eg-purchase-box fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

.eg-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- tiles ---------- */

.eg-purchase-box .eg-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: stretch;
}

.eg-purchase-box .eg-tiles--single {
    grid-template-columns: 1fr;
}

.eg-purchase-box .eg-tile {
    position: relative;
    padding: 10px 0 14px;
}

/* the real radio stays in the DOM (product.js depends on it) but is not visible.
   It must not be display:none, otherwise the label click is not forwarded to it. */
.eg-purchase-box .eg-tile__input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

/* full-tile click target */
.eg-purchase-box .eg-tile__hit {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    z-index: 1;
    cursor: pointer;
}

.eg-purchase-box .eg-tile__body {
    position: relative;
    z-index: 2;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 118px;
    padding: 18px 12px;
    background: #fff;
    border: 1px solid #d7d7d7;
    border-radius: 2px;
    transition: border-color .15s ease, box-shadow .15s ease, color .15s ease;
}

.eg-purchase-box .eg-tile__input:checked ~ .eg-tile__body {
    border: 2px solid #111;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.eg-purchase-box .eg-tile__input:not(:checked) ~ .eg-tile__body {
    color: #8d8d8d;
    background: #fafafa;
}

/* keyboard focus */
.eg-purchase-box .eg-tile__input:focus ~ .eg-tile__body {
    outline: 2px solid #4a90d9;
    outline-offset: 2px;
}

.eg-purchase-box .eg-tile__title {
    font-size: 17px;
    font-weight: 700;
    font-style: italic;
    line-height: 1.2;
    margin-bottom: 4px;
}

/* neutralise the global .product-price rules inside the tiles */
.eg-purchase-box .eg-tile__price.product-price {
    display: block;
    margin: 0;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

.eg-purchase-box .eg-tile__price-now {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    color: inherit;
}

.eg-purchase-box .eg-tile__price-was {
    display: inline-block;
    margin-left: 6px;
    font-size: 15px;
    font-weight: 500;
    color: #9a9a9a;
}

.eg-purchase-box .eg-tile__price-was strike {
    text-decoration: line-through;
}

.eg-purchase-box .eg-tile__freq {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: inherit;
}

.eg-purchase-box .eg-freq-toggle {
    pointer-events: auto;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.eg-purchase-box .eg-freq-toggle i {
    margin-left: 4px;
    font-size: 12px;
}

/* ---------- badges ---------- */

.eg-purchase-box .eg-badge {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none;
    white-space: nowrap;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
}

.eg-purchase-box .eg-badge--save {
    top: 0;
    background: #12a150;
    color: #fff;
}

.eg-purchase-box .eg-badge--best {
    bottom: 4px;
    background: #f8c8dc;
    color: #111;
}

/* ---------- delivery frequency panel ---------- */

.eg-purchase-box .eg-freq-panel__inner {
    margin-top: 18px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
}

.eg-purchase-box .eg-freq-panel__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: 8px;
}

.eg-purchase-box .eg-freq-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
}

.eg-purchase-box .eg-freq-option__price {
    font-size: 14px;
    white-space: nowrap;
}

.eg-purchase-box .eg-freq-option__price .orignal-price {
    font-size: 12px;
    margin-left: 4px;
}

.eg-purchase-box .eg-freq-panel__notice {
    width: 100%;
    text-align: center;
    padding: 5px;
    font-size: 12px;
    margin-top: 12px;
}

/* ---------- subscription benefits ---------- */

.eg-purchase-box .eg-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
}

.eg-purchase-box .eg-benefit {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.eg-purchase-box .eg-benefit__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: #dcdcdc;
    color: #111;
    font-size: 15px;
}

.eg-purchase-box .eg-benefit__text {
    font-size: 12px;
    line-height: 1.35;
    color: #4a4a4a;
}

/* ---------- mobile ---------- */

@media (max-width: 575.98px) {
    .eg-purchase-box {
        padding: 16px 14px;
    }

    .eg-purchase-box .eg-tiles {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .eg-purchase-box .eg-tile__body {
        min-height: 0;
        padding: 20px 14px;
    }

    .eg-purchase-box .eg-tile__price-now {
        font-size: 26px;
    }

    /* tap-friendly targets */
    .eg-purchase-box .eg-freq-toggle {
        display: inline-block;
        min-height: 44px;
        line-height: 44px;
    }

    .eg-purchase-box .eg-freq-option {
        min-height: 44px;
    }

    .eg-purchase-box .eg-benefits {
        grid-template-columns: 1fr;
        gap: 14px;
        text-align: left;
    }

    .eg-purchase-box .eg-benefit {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .eg-purchase-box .eg-benefit__icon {
        margin: 0 10px 0 0;
        flex: 0 0 36px;
    }
}

/* ==========================================================================
   HSA/FSA eligibility badge + educational modal (Engage Global only)
   ========================================================================== */

.eg-hsa-badge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 13px;
    color: #4a4a4a;
}

.eg-hsa-badge__label {
    font-weight: 700;
    color: #111;
}

.eg-hsa-badge__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #12a150;
    font-size: 15px;
}

.eg-hsa-badge__link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: #111;
    text-decoration: underline;
    cursor: pointer;
}

.eg-hsa-badge__link:hover,
.eg-hsa-badge__link:focus {
    color: #000;
}

/* ---------- modal shell ---------- */

.eg-hsa-modal .eg-hsa-modal__dialog {
    max-width: 440px;
}

.eg-hsa-modal .eg-hsa-modal__content {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
    overflow: hidden;
}

.eg-hsa-modal__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 12px;
}

.eg-hsa-modal__brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 8px;
    background: #0f3b3a;
    color: #fff;
    font-size: 16px;
}

.eg-hsa-modal__title {
    flex: 1 1 auto;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #111;
}

.eg-hsa-modal__close {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #efefef;
    color: #555;
    font-size: 14px;
    cursor: pointer;
}

.eg-hsa-modal__close:hover,
.eg-hsa-modal__close:focus {
    background: #e2e2e2;
    color: #111;
}

.eg-hsa-modal__body {
    padding: 0 20px 4px;
}

.eg-hsa-modal__lead {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
}

.eg-hsa-modal__lead strong {
    color: #111;
}

/* ---------- tabs ---------- */

.eg-hsa-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 3px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: #efefef;
}

.eg-hsa-tab {
    border: 0;
    padding: 9px 10px;
    min-height: 40px;
    border-radius: 999px;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: #5a5a5a;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.eg-hsa-tab.is-active {
    background: #fff;
    color: #111;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

/* ---------- steps ---------- */

.eg-hsa-steps {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
}

.eg-hsa-steps.is-active {
    display: block;
}

.eg-hsa-step {
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
}

.eg-hsa-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    margin-top: 1px;
    border-radius: 50%;
    background: #0f3b3a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.eg-hsa-step__title {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 700;
    color: #111;
}

.eg-hsa-step__body {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #5a5a5a;
}

/* ---------- footer ---------- */

.eg-hsa-modal__footer {
    padding: 14px 20px 18px;
    border-top: 1px solid #e8e8e8;
    text-align: center;
}

.eg-hsa-modal__brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #0f3b3a;
    font-size: 15px;
    font-weight: 700;
}

.eg-hsa-modal__brand-name {
    font-size: 15px;
    letter-spacing: -.01em;
}

.eg-hsa-modal__disclaimer {
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
    color: #8a8a8a;
}

.eg-hsa-modal__disclaimer a {
    color: #8a8a8a;
    text-decoration: underline;
}

/* ---------- mobile ---------- */

@media (max-width: 575.98px) {
    .eg-hsa-modal .eg-hsa-modal__dialog {
        max-width: none;
        margin: 12px;
    }

    .eg-hsa-badge {
        font-size: 12.5px;
        gap: 6px;
    }

    .eg-hsa-badge__link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .eg-hsa-tab {
        min-height: 44px;
    }
}

.eg-hsa-selection {
    display: none;
    margin: -8px 0 14px;
    font-size: 12px;
    line-height: 1.4;
    color: #12a150;
}

.eg-hsa-selection.is-visible {
    display: block;
}

/* ==========================================================================
   Truemed HSA/FSA banner - order confirmation page (Engage Global only)
   ========================================================================== */

.eg-truemed-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 640px;
    margin: 16px auto 0;
    padding: 12px 16px;
    border: 1px solid #cfe8da;
    border-radius: 8px;
    background: #f2faf6;
}

.eg-truemed-banner__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    margin-top: 1px;
    color: #12a150;
    font-size: 16px;
}

.eg-truemed-banner__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #24503c;
}

.eg-truemed-banner__link {
    font-weight: 700;
    color: #0f3b3a;
    text-decoration: underline;
}

.eg-truemed-banner__link:hover,
.eg-truemed-banner__link:focus {
    color: #12a150;
}

@media (max-width: 575.98px) {
    .eg-truemed-banner {
        margin: 14px 0 0;
        padding: 12px 14px;
    }

    .eg-truemed-banner__link {
        display: inline-block;
        min-height: 44px;
        line-height: 44px;
    }
}

/* Label under the headline product price on the PDP (Engage Global only). */
.price-section .eg-retail-price-label {
    margin: -6px 0 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #6b6b6b;
}

@media (max-width: 575.98px) {
    .price-section .eg-retail-price-label {
        font-size: 13px;
    }
}
