/* WooPlus Age Verification — Gate styles */
.wpl-age-gate {
    position: fixed;
    inset: 0;
    /* Must sit ABOVE every other WC+ takeover — notably the Shopbot homepage
       overlay (z-index 2147483000). Age verification is a legal gate: it has to
       blur + block the whole site (including the Shopbot) until answered, never
       end up behind another overlay. Max 32-bit z-index wins outright. */
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    font-family: Vazirmatn, Tahoma, system-ui, sans-serif;
    animation: wpl-age-in 0.25s ease-out;
}
@keyframes wpl-age-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.wpl-age-gate__backdrop {
    position: absolute;
    inset: 0;
    background: var(--wpl-age-overlay, rgba(0,0,0,0.7));
    backdrop-filter: blur(var(--wpl-age-blur, 8px));
    -webkit-backdrop-filter: blur(var(--wpl-age-blur, 8px));
}
.wpl-age-gate__box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    max-width: 480px;
    width: calc(100% - 32px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    z-index: 1;
    animation: wpl-age-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes wpl-age-pop {
    from { transform: scale(0.85) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0);       opacity: 1; }
}
.wpl-age-gate__logo {
    max-width: 100px;
    max-height: 60px;
    margin: 0 auto 16px;
    display: block;
}
.wpl-age-gate__logo--lg {
    max-width: 160px;
    max-height: 100px;
    margin-bottom: 24px;
}
.wpl-age-gate__title {
    margin: 0 0 12px;
    font-size: 22px;
    color: #111827;
    font-weight: 800;
}
.wpl-age-gate__title--lg { font-size: 36px; margin-bottom: 18px; }
.wpl-age-gate__sub {
    margin: 0 0 24px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.8;
}
.wpl-age-gate__sub--lg { font-size: 18px; max-width: 600px; margin-left: auto; margin-right: auto; }

.wpl-age-gate__form { display: flex; flex-direction: column; gap: 14px; }
.wpl-age-gate__field { display: flex; flex-direction: column; gap: 6px; text-align: start; }
.wpl-age-gate__field > span { font-size: 13px; color: #374151; font-weight: 600; }
.wpl-age-gate__field input[type="date"],
.wpl-age-gate__field input[type="number"] {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    direction: ltr;
    text-align: center;
}
.wpl-age-gate__field input:focus { outline: none; border-color: var(--wpl-age-primary, #157a41); box-shadow: 0 0 0 3px rgba(21,122,65,0.15); }

.wpl-age-gate__jalali { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

.wpl-age-gate__terms { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4b5563; }
.wpl-age-gate__terms input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; }
.wpl-age-gate__terms a { color: var(--wpl-age-primary, #157a41); text-decoration: underline; }

.wpl-age-gate__actions { display: flex; gap: 10px; margin-top: 8px; flex-direction: column; }
.wpl-age-gate__actions--lg { max-width: 400px; margin-left: auto; margin-right: auto; }

.wpl-age-gate__btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
}
.wpl-age-gate__btn--lg { padding: 16px 28px; font-size: 16px; }
.wpl-age-gate__btn--primary { background: var(--wpl-age-primary, #157a41); color: #fff; }
.wpl-age-gate__btn--primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(21,122,65,0.35); }
.wpl-age-gate__btn--ghost { background: #f3f4f6; color: #6b7280; }
.wpl-age-gate__btn--ghost:hover { background: #e5e7eb; }
.wpl-age-gate__btn:disabled { opacity: .6; cursor: wait; }

.wpl-age-gate__status { margin: 12px 0 0; font-size: 13px; min-height: 1em; color: #6b7280; }
.wpl-age-gate__status.is-error   { color: #ef4444; }
.wpl-age-gate__status.is-success { color: #10b981; }

/* ---- Template variants ---- */
.wpl-age-gate--modern .wpl-age-gate__box {
    background: linear-gradient(180deg, #fff 0%, #f9fafb 100%);
    border: 1px solid #e5e7eb;
}
.wpl-age-gate--classic .wpl-age-gate__box {
    background: #fffbeb;
    border: 4px solid var(--wpl-age-primary, #157a41);
    border-radius: 8px;
}
.wpl-age-gate--minimal .wpl-age-gate__box {
    box-shadow: none;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    padding: 24px;
}
.wpl-age-gate--fullscreen { display: flex; flex-direction: column; }
.wpl-age-gate--fullscreen .wpl-age-gate__fullscreen {
    position: relative;
    z-index: 1;
    background: #fff;
    text-align: center;
    padding: 60px 24px;
    max-width: 720px;
    width: 100%;
}
.wpl-age-gate--fullscreen .wpl-age-gate__backdrop { background: var(--wpl-age-overlay, rgba(0,0,0,0.9)); }
.wpl-age-gate__form--lg .wpl-age-gate__field { max-width: 400px; margin: 0 auto; }

/* Body lock — prevent scrolling behind gate */
body.wpl-age-locked { overflow: hidden !important; }


/* ==========================================================================
 * احترام به «کاهش حرکت» سیستم عامل                            (v6.16.0.8)
 * --------------------------------------------------------------------------
 * این شیت انیمیشن تعریف می کند و تا پیش از این هیچ محافظی نداشت. کاربری که
 * روی گوشی اش «کاهش حرکت» را روشن کرده، این کار را برای سرگیجه، میگرن یا
 * اختلال دهلیزی می کند؛ نادیده گرفتن ان یعنی حالش بد شود.
 *
 * چرا زمان نزدیک صفر و نه animation:none — بعضی کی فریم ها حالت پایانی را
 * می سازند (مثلا از opacity صفر به یک). none کردنشان عنصر را برای همیشه
 * نامرئی نگه می دارد؛ زمان ناچیز همان حالت پایانی را فورا اعمال می کند.
 * دامنه هم عمدا به فضای نام همین ماژول محدود است تا استایل قالب فروشنده
 * را از کار نیندازد.
 * ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    [class^="wpl-"],
    [class*=" wpl-"] {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}
