/* User Access Manager - frontend restricted access states */
.ram-block-notice,
.ram-restricted-access,
.ram-restricted-access * {
    box-sizing: border-box;
}

.ram-block-notice {
    max-width: 720px;
    margin: 2em auto;
    padding: 24px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 10px;
    color: #7c2d12;
    line-height: 1.5;
}

.ram-block-notice strong,
.ram-block-notice__title {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #92400e;
}

.ram-block-notice__cta {
    margin-top: 16px;
}

.ram-flash {
    margin: 0 0 1.5em;
    padding: 14px 18px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 8px;
    color: #7c2d12;
    font-weight: 500;
}

.ram-restricted-access {
    --ram-pp-navy: #102942;
    --ram-pp-blue: #2b6f9f;
    --ram-pp-orange: #d8793b;
    --ram-pp-cream: #fff8f0;
    --ram-pp-border: #ead9ca;
    --ram-pp-text: #263443;
    --ram-pp-muted: #667586;

    align-items: center;
    background:
        radial-gradient(circle at top left, rgba(216, 121, 59, 0.12), transparent 34%),
        linear-gradient(135deg, #f8fbfd 0%, #fff8f0 100%);
    color: var(--ram-pp-text);
    display: flex;
    justify-content: center;
    min-height: min(720px, 72vh);
    padding: clamp(42px, 7vw, 88px) 18px;
    width: 100%;
}

.ram-restricted-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--ram-pp-border);
    border-radius: 8px;
    box-shadow: 0 22px 55px rgba(16, 41, 66, 0.12);
    max-width: 760px;
    overflow: hidden;
    padding: clamp(32px, 5vw, 58px);
    position: relative;
    text-align: center;
    width: 100%;
}

.ram-restricted-card::before {
    background: linear-gradient(90deg, var(--ram-pp-blue), var(--ram-pp-orange));
    content: "";
    height: 5px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.ram-restricted-kicker {
    background: #eef6fb;
    border: 1px solid #c9dfed;
    border-radius: 999px;
    color: var(--ram-pp-blue);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1;
    margin-bottom: 18px;
    padding: 9px 13px;
    text-transform: uppercase;
}

.ram-restricted-access h1 {
    color: var(--ram-pp-navy);
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.08;
    margin: 0 auto 18px;
    max-width: 680px;
}

.ram-restricted-lede {
    color: var(--ram-pp-text);
    font-size: clamp(17px, 2.5vw, 20px);
    line-height: 1.62;
    margin: 0 auto 12px;
    max-width: 660px;
}

.ram-restricted-copy {
    color: var(--ram-pp-muted);
    font-size: 15px;
    line-height: 1.7;
    margin: 0 auto 28px;
    max-width: 620px;
}

.ram-restricted-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.ram-restricted-button {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: 15px;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-height: 48px;
    min-width: 156px;
    padding: 14px 22px;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.ram-restricted-button:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.ram-restricted-button--primary {
    background: var(--ram-pp-orange);
    border: 1px solid var(--ram-pp-orange);
    color: #ffffff;
}

.ram-restricted-button--primary:hover,
.ram-restricted-button--primary:focus {
    background: #bd642c;
    border-color: #bd642c;
    color: #ffffff;
}

.ram-restricted-button--secondary {
    background: #ffffff;
    border: 1px solid #bfd5e5;
    color: var(--ram-pp-navy);
}

.ram-restricted-button--secondary:hover,
.ram-restricted-button--secondary:focus {
    background: #eef6fb;
    border-color: #9ec4dd;
    color: var(--ram-pp-navy);
}

body.ram-restricted-page {
    overflow: auto !important;
}

/*
 * Permanent cart-drawer suppression for restricted pages.
 *
 * The JS in restricted_cart_suppression_script() used to gate this rule
 * via a transient `ram-cart-auto-close` class that was stripped after a
 * 5.2s cleanup window. That gave themes/Elementor a chance to re-open
 * the drawer with nothing to stop them. The rule now keys on the
 * restricted-page body class alone, so as long as the user is on the
 * restricted screen, every known cart-drawer/overlay stays hidden.
 */
body.ram-restricted-page .xoo-wsc-modal,
body.ram-restricted-page .xoo-wsc-container,
body.ram-restricted-page .xoo-wsc-opac,
body.ram-restricted-page .xoo-wsc-overlay,
body.ram-restricted-page .xoo-wsc-backdrop,
body.ram-restricted-page .cart-drawer,
body.ram-restricted-page .cart-drawer-overlay,
body.ram-restricted-page .cart-drawer__overlay,
body.ram-restricted-page .side-cart,
body.ram-restricted-page .side-cart-overlay,
body.ram-restricted-page .mini-cart-drawer,
body.ram-restricted-page .mini-cart-overlay,
body.ram-restricted-page .woocommerce-mini-cart__drawer,
body.ram-restricted-page .wc-block-mini-cart__drawer,
body.ram-restricted-page .wc-block-components-drawer,
body.ram-restricted-page .wc-block-components-drawer__screen-overlay,
body.ram-restricted-page .wc-block-components-drawer__screen-overlay--is-visible,
body.ram-restricted-page .elementor-menu-cart--shown,
body.ram-restricted-page .elementor-menu-cart--open,
body.ram-restricted-page .elementor-menu-cart__container,
body.ram-restricted-page .elementor-menu-cart__main,
body.ram-restricted-page .elementor-menu-cart__overlay,
body.ram-restricted-page .elementor-menu-cart__modal,
body.ram-restricted-page .elementor-lightbox.elementor-menu-cart__container,
body.ram-restricted-page .offcanvas-cart,
body.ram-restricted-page .off-canvas-cart,
body.ram-restricted-page .drawer-cart,
body.ram-restricted-page .site-cart-drawer,
body.ram-restricted-page .theme-cart-drawer,
body.ram-restricted-page .pp-cart-drawer,
body.ram-restricted-page .pp-cart-overlay {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

@media (max-width: 560px) {
    .ram-restricted-access {
        min-height: 68vh;
        padding: 32px 14px;
    }

    .ram-restricted-card {
        padding: 30px 20px;
    }

    .ram-restricted-button {
        width: 100%;
    }
}

/* ------------------------------------------------------------------
 * Set-password landing page ([ram_set_password] shortcode)
 * Mirrors the restricted-access palette so the page feels like the
 * rest of the plugin's frontend.
 * ------------------------------------------------------------------ */
.ram-setpw,
.ram-setpw * {
    box-sizing: border-box;
}

.ram-setpw {
    --ram-pp-navy: #102942;
    --ram-pp-blue: #2b6f9f;
    --ram-pp-orange: #d8793b;
    --ram-pp-cream: #fff8f0;
    --ram-pp-border: #ead9ca;
    --ram-pp-text: #263443;
    --ram-pp-muted: #667586;

    align-items: center;
    background:
        radial-gradient(circle at top right, rgba(43, 111, 159, 0.10), transparent 38%),
        linear-gradient(135deg, #f8fbfd 0%, #fff8f0 100%);
    color: var(--ram-pp-text);
    display: flex;
    justify-content: center;
    min-height: min(640px, 70vh);
    padding: clamp(36px, 6vw, 72px) 18px;
    width: 100%;
}

.ram-setpw-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--ram-pp-border);
    border-radius: 12px;
    box-shadow: 0 22px 55px rgba(16, 41, 66, 0.10);
    max-width: 480px;
    padding: clamp(28px, 4vw, 44px);
    position: relative;
    width: 100%;
}

.ram-setpw-card::before {
    background: linear-gradient(90deg, var(--ram-pp-blue), var(--ram-pp-orange));
    border-radius: 12px 12px 0 0;
    content: "";
    height: 5px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.ram-setpw-kicker {
    background: #eef6fb;
    border: 1px solid #c9dfed;
    border-radius: 999px;
    color: var(--ram-pp-blue);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1;
    margin-bottom: 14px;
    padding: 8px 12px;
    text-transform: uppercase;
}

.ram-setpw-title {
    color: var(--ram-pp-navy);
    font-size: clamp(24px, 3.5vw, 32px);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 10px;
}

.ram-setpw-greeting {
    color: var(--ram-pp-muted);
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 22px;
}

.ram-setpw-notice {
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 18px;
    padding: 12px 14px;
}

.ram-setpw-notice--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.ram-setpw-notice--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.ram-setpw-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ram-setpw-label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    color: var(--ram-pp-navy);
}

.ram-setpw-label input {
    background: #fff;
    border: 1px solid #bfd5e5;
    border-radius: 8px;
    color: var(--ram-pp-text);
    font-size: 15px;
    padding: 12px 14px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
    width: 100%;
}

.ram-setpw-label input:focus {
    border-color: var(--ram-pp-blue);
    box-shadow: 0 0 0 3px rgba(43, 111, 159, 0.15);
    outline: none;
}

.ram-setpw-hint {
    color: var(--ram-pp-muted);
    font-size: 13px;
    line-height: 1.55;
    margin: 4px 0 6px;
}

.ram-setpw-submit {
    align-items: center;
    background: var(--ram-pp-orange);
    border: 1px solid var(--ram-pp-orange);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 15px;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-height: 48px;
    padding: 14px 22px;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.ram-setpw-submit:hover:not(:disabled),
.ram-setpw-submit:focus:not(:disabled) {
    background: #bd642c;
    border-color: #bd642c;
    transform: translateY(-1px);
}

.ram-setpw-submit:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

@media (max-width: 480px) {
    .ram-setpw {
        min-height: 60vh;
        padding: 28px 14px;
    }

    .ram-setpw-card {
        padding: 24px 20px;
    }
}
