/* ═══════════════════════════════════════
   Optique RX – Frontend Styles v4.3
   ═══════════════════════════════════════ */

.orx-form {
    margin: 20px 0;
    font-family: inherit;
}

/* ── Eye toggles (aligned to grid columns) ── */
.orx-eyes {
    display: grid;
    grid-template-columns: 160px 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.orx-eyes-spacer {
    /* empty first column to align with label column */
}

.orx-eye-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    justify-content: center;
}

.orx-eye-cb {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5a9;
}

/* ── Grid layout ── */
.orx-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.orx-row {
    display: grid;
    grid-template-columns: 160px 1fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.orx-row:last-child {
    border-bottom: none;
}

/* .orx-row-format inherits standard 3-col grid */

/* ── Labels ── */
.orx-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.orx-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #666;
    font-size: 11px;
    cursor: help;
    font-style: normal;
}

/* ── Cells ── */
.orx-cell {
    min-height: 38px;
    display: flex;
    align-items: center;
}

.orx-cell-disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ── Selects ── */
.orx-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    appearance: auto;
    -webkit-appearance: auto;
    cursor: pointer;
    transition: border-color 0.2s;
}

.orx-select:hover:not(:disabled) {
    border-color: #5a9;
}

.orx-select:focus {
    outline: none;
    border-color: #5a9;
    box-shadow: 0 0 0 2px rgba(90, 153, 153, 0.15);
}

.orx-select:disabled {
    background: #f8f8f8;
    color: #aaa;
    cursor: not-allowed;
}

/* ── Static value (display fields type=fixed) ── */
.orx-static-value {
    font-size: 14px;
    color: #555;
    font-weight: 500;
    padding: 8px 0;
}

/* ── Divider ── */
.orx-divider {
    border: none;
    border-top: 2px solid #e8e8e8;
    margin: 12px 0;
}

/* ── Price ── */
.orx-price-wrap {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 0;
    border-top: 2px solid #333;
}

.orx-price-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.orx-price-total {
    font-size: 24px;
    font-weight: 700;
    color: #2c6e49;
}

/* ── Button disabled state ── */
.single_add_to_cart_button.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Stripe Express Checkout: always hidden on RX product pages ──
   Express bypasses ORX lens specs. Stripe may set inline display:block;
   body.orx-express-locked + !important keeps wallets off. */
body.orx-express-locked #wc-stripe-express-checkout-element,
body.orx-express-locked #wc-stripe-payment-request-wrapper,
body.orx-express-locked .wc-stripe-payment-request-wrapper,
body.orx-express-locked #wcpay-payment-request-wrapper,
body.orx-express-locked .wcpay-payment-request-wrapper,
body.orx-express-locked .wc-stripe-express-checkout-element,
body.orx-express-locked #payment-request-button,
body.orx-express-locked .AmazonPayButton,
body.orx-express-locked #pay_with_amazon {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

/* ── Discount trigger link ── */
.orx-discount-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #83A2B1;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s;
    cursor: pointer;
}
.orx-discount-trigger:hover {
    color: #3C4F56;
    text-decoration: underline;
}
.orx-row-discount-link {
    border-bottom: none !important;
    padding: 2px 0 !important;
}

/* ── Discount modal overlay ── */
.orx-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(60, 79, 86, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* ── Modal container ── */
.orx-modal {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(60, 79, 86, 0.30), 0 4px 16px rgba(0,0,0,0.08);
    max-width: 440px;
    width: 100%;
    overflow: hidden;
    animation: orx-modal-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes orx-modal-in {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Modal header ── */
.orx-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #3C4F56;
    color: #fff;
}
.orx-modal-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.orx-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
    flex-shrink: 0;
}
.orx-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ── Modal body ── */
.orx-modal-body {
    padding: 0;
}

/* ── Discount table ── */
.orx-discount-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.orx-discount-table thead {
    background: #f3f6f8;
}
.orx-discount-table th {
    padding: 12px 24px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #83A2B1;
    text-align: left;
    border-bottom: 2px solid #e3eaee;
}
.orx-discount-table td {
    padding: 14px 24px;
    border-bottom: 1px solid #f0f2f4;
    vertical-align: middle;
}
.orx-discount-table tbody tr {
    transition: background 0.15s;
}
.orx-discount-table tbody tr:hover {
    background: #f8fafb;
}
.orx-discount-table tr:last-child td {
    border-bottom: none;
}
.orx-dt-qty {
    font-weight: 700;
    color: #3C4F56;
    font-size: 15px;
}
.orx-dt-qty span {
    font-size: 11px;
    font-weight: 400;
    color: #83A2B1;
    margin-left: 2px;
}
.orx-dt-price {
    color: #3C4F56;
    font-weight: 700;
    font-size: 15px;
}
.orx-dt-saving {
    color: #83A2B1;
    font-size: 13px;
    font-weight: 500;
}
.orx-dt-saving-badge {
    display: inline-block;
    background: #e8f4ec;
    color: #2e7d4f;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.orx-modal-note {
    padding: 16px 24px;
    margin: 0;
    font-size: 12px;
    color: #83A2B1;
    background: #f8fafb;
    border-top: 1px solid #eef1f3;
    line-height: 1.5;
}

/* ── Strikethrough price (above main price) ── */
.orx-price-was {
    display: block;
    font-size: 14px !important;
    color: #999 !important;
    font-weight: 400 !important;
    text-decoration: line-through;
    line-height: 1.2;
    margin-bottom: 2px;
}
.orx-price-discount-badge {
    display: inline-block;
    background: #e8f4ec;
    color: #2e7d4f;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .orx-row {
        grid-template-columns: 1fr 1fr;
        gap: 6px 12px;
        padding: 10px 0;
    }

    .orx-row .orx-label {
        grid-column: 1 / -1;
        font-size: 13px;
    }

    .orx-eyes {
        grid-template-columns: 1fr 1fr;
    }
    .orx-eyes-spacer { display: none; }

    .orx-cell {
        padding-left: 0;
    }

    .orx-price-total {
        font-size: 20px;
    }
}

/* ── Non-RX discount link (outside RX form) ── */
.orx-non-rx-discount {
    margin: 12px 0 4px;
    padding: 0;
}
