/* Oxiline Shipping Protection — cart drawer / cart page row + checkout toggle. */

/* Discreet information card (no price emphasis, subtle border). */
.oxi-sp-row {
    display: flex;
    padding: 12px 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.015);
}

.oxi-sp-row.oxi-sp-pending {
    opacity: 0.6;
    pointer-events: none;
    cursor: progress;
}

.oxi-sp-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.oxi-sp-icon {
    flex: 0 0 auto;
    color: #64748b;
    display: inline-flex;
    margin-top: 2px;
}

.oxi-sp-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.oxi-sp-title-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.oxi-sp-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-weight: 500;
    color: #334155;
}

/* Co-brand lockup: "Checkout+ by [Oxiline logo]". */
.oxi-cp-brand-name {
    font-weight: 500;
    color: #334155;
}

.oxi-cp-brand-by {
    font-weight: 400;
    color: #334155;
}

.oxi-cp-brandmark {
    display: inline-flex;
    align-items: center;
}

/* !important: WooCommerce's `.woocommerce img { height:auto }` (0,1,1) outranks
   a plain class on cart/product pages, same issue handled in the site header. */
.oxi-cp-brandmark img,
.oxi-cp-brandmark svg,
.oxi-cp-brandmark-img {
    height: 18px !important;
    width: auto !important;
    display: block;
}

/* Price kept light — not bold. */
.oxi-sp-amount {
    font-weight: 400;
    color: #334155;
    white-space: nowrap;
}

.oxi-sp-desc {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.4;
    /* A tad lighter than the title (#334155) for hierarchy, still legible. */
    color: #64748b;
}

/* Opt-out/opt-in link under the Proceed-to-Checkout button. */
.oxi-sp-toggle-wrap {
    display: flex;
    justify-content: center;
}

.oxi-sp-toggle-wrap.oxi-sp-pending {
    opacity: 0.6;
    pointer-events: none;
    cursor: progress;
}

/*
 * Hard reset: CheckoutWC (and some themes) style every <button> as a filled
 * button via `.checkoutwc button`, which out-specifies our class selector and
 * renders the link as a big grey block. Force a plain inline text link.
 */
.oxi-sp-toggle {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: none !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.3 !important;
    border-radius: 0 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    font-size: 13px;
    font-weight: 400 !important;
    color: #64748b !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    cursor: pointer;
}

.oxi-sp-toggle:hover {
    background: none !important;
    color: #0f172a !important;
}

/* Checkout (CheckoutWC order review). */

/* Descriptive sub-line shown under the "Checkout+" fee label in the order
 * review (e.g. "Cashback & protection against loss, theft & damage"). cfw
 * renders the label cell as plain text, so this node is injected client-side
 * (assets/js/shipping-protection.js) into the fee row's label <th>. */
.oxi-cp-fee-desc {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    color: inherit; /* match the "Checkout+" label color */
    white-space: normal;
}

/* Subtle "Remove" link sitting right under the fee line item. */
.oxi-sp-fee-action {
    display: block;
    margin-top: 2px;
    line-height: 1.2;
    text-align: right;
}

.oxi-sp-fee-action.oxi-sp-pending {
    opacity: 0.6;
    pointer-events: none;
}

/* "Add protection" link under the order total. */
.oxi-sp-checkout-add {
    text-align: right;
}

.oxi-sp-checkout-add.oxi-sp-pending {
    opacity: 0.6;
    pointer-events: none;
}

/* Inline hyperlink style — intentionally low-key. */
.oxi-sp-toggle--link {
    font-size: 12px;
    font-weight: 400 !important;
    color: #94a3b8 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

.oxi-sp-toggle--link:hover {
    color: #475569 !important;
}

/*
 * Specificity boost for CheckoutWC: `.checkoutwc button { color:#fff }` has
 * higher specificity (0,1,1) than a single class (0,1,0), so even our
 * !important color lost. These descendant selectors (0,2,0) win, and we darken
 * the link so it's clearly readable on the light totals background.
 */
.oxi-sp-fee-action .oxi-sp-toggle,
.oxi-sp-checkout-add .oxi-sp-toggle {
    /* Match the muted gray of the surrounding totals text. */
    color: inherit !important;
    font-size: 12px !important;
    text-decoration: underline !important;
}

/* Keep the inherited gray on hover (CheckoutWC's button:hover turns it white). */
.oxi-sp-fee-action .oxi-sp-toggle:hover,
.oxi-sp-checkout-add .oxi-sp-toggle:hover {
    color: inherit !important;
    opacity: 0.75;
}

.oxi-sp-toggle-wrap .oxi-sp-toggle {
    color: #475569 !important;
    text-decoration: underline !important;
}

.oxi-sp-toggle-wrap .oxi-sp-toggle:hover {
    color: #0f172a !important;
}

/* ====================================================================
 * Checkout+ — info button + benefits modal
 * ==================================================================== */

/* Small "(i)" trigger that sits next to the brand label. */
.oxi-cp-info {
    -webkit-appearance: none;
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    margin: 0 0 0 4px;
    line-height: 0;
    color: #94a3b8;
    cursor: pointer;
    vertical-align: middle;
    display: inline-flex;
}

.oxi-cp-info:hover,
.oxi-cp-info:focus-visible {
    color: #0f172a;
    outline: none;
}

/* Overlay + centered dialog. Hidden via the [hidden] attribute (JS toggles). */
.oxi-cp-modal[hidden] {
    display: none !important;
}

.oxi-cp-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.oxi-cp-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.oxi-cp-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(0, 14, 28, 0.28);
    padding: 34px 32px 26px;
    /* Brand type: self-hosted NeueHaas, available globally on the page. */
    font-family: 'NeueHaas-400', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.oxi-cp-modal__close {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F2F3F3;
    border: 0;
    border-radius: 9999px;
    color: #67707d;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.oxi-cp-modal__close:hover {
    background: #E8E9EB;
    color: #1E293B;
}

.oxi-cp-modal__heading {
    margin: 0;
    padding-right: 36px;
    font-family: 'NeueHaas-600', sans-serif;
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: -0.01em;
    font-weight: 400;
    color: #1E293B;
}

.oxi-cp-modal__subheading {
    margin: 10px 0 24px;
    font-family: 'NeueHaas-400', sans-serif;
    font-size: 15px;
    line-height: 1.45;
    color: #67707d;
}

.oxi-cp-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.oxi-cp-benefit {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* Brand teal accent: theme-green on a theme-green-50 tint. */
.oxi-cp-benefit__icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #E6F7F9;
    color: #2ABACE;
}

.oxi-cp-benefit__copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-top: 1px;
}

.oxi-cp-benefit__title {
    font-family: 'NeueHaas-600', sans-serif;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 400;
    color: #1E293B;
}

.oxi-cp-benefit__desc {
    font-family: 'NeueHaas-400', sans-serif;
    font-size: 13.5px;
    line-height: 1.45;
    color: #67707d;
}

.oxi-cp-modal__fineprint {
    margin: 24px 0 0;
    padding-top: 18px;
    border-top: 1px solid #E8E9EB;
    font-family: 'NeueHaas-400', sans-serif;
    font-size: 11.5px;
    line-height: 1.55;
    color: #9ca3af;
}

.oxi-cp-modal__byline {
    margin-top: 16px;
    text-align: center;
    font-family: 'NeueHaas-600', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #67707d;
}

/* When the modal is open, lock background scroll. */
body.oxi-cp-modal-open {
    overflow: hidden;
}
