/* ==========================================================================
   CSS پایه و عمومی
   --------------------------------------------------------------------------
   01. متغیرها
   02. reset
   03. تایپوگرافی عمومی
   04. کلاس‌های کمکی
   ========================================================================== */

/* Hide directional scrollbar buttons without hiding either scroll track. */
html::-webkit-scrollbar-button,
body::-webkit-scrollbar-button,
body *::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

:root {
    --rp-bg: #f7f7f6;
    --rp-surface: #f1f0ef;
    --rp-text: #343a40;
    --rp-text-strong: #111111;
    --rp-muted: #74777a;
    --rp-line: #e6e6e3;
    --rp-accent: #fd314a;
    --rp-max-width: 1568px;
    --rp-radius-pill: 999px;
    --rp-font: "IRANSansX", "Vazirmatn", "Yekan Bakh", Tahoma, Arial, sans-serif;
}

html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: var(--rp-font);
    background: #ffffff;
    color: var(--rp-text);
    line-height: 1.8;
    direction: rtl;
}

a {
    color: inherit;
    transition: color .18s ease, text-decoration-color .18s ease, border-color .18s ease;
}

input[type="radio"],
input[type="checkbox"] {
    transition: transform .18s ease;
}

input[type="radio"]:checked,
input[type="checkbox"]:checked {
    transform: scale(1.12);
}

@media (prefers-reduced-motion: reduce) {
    a { transition: none; }
    input[type="radio"], input[type="checkbox"] { transition: none; }
}

img, svg {
    display: block;
    max-width: 100%;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* WooCommerce notice toast: green, non-blocking, desktop/mobile */
body.rp-wc-notice-modal-open,
body.rp-wc-notice-toast-open {
    overflow: auto !important;
    overflow-y: auto !important;
}

.rp-wc-notice-modal.rp-wc-notice-toast,
.rp-wc-notice-modal {
    position: fixed !important;
    top: calc(14px + env(safe-area-inset-top, 0px)) !important;
    right: 16px !important;
    left: 16px !important;
    bottom: auto !important;
    inset: auto 16px auto 16px !important;
    z-index: 1000002 !important;
    width: auto !important;
    max-width: 760px !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    direction: rtl !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-12px) scale(.98) !important;
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease !important;
    box-sizing: border-box !important;
}

.rp-wc-notice-modal.rp-wc-notice-toast.is-open,
.rp-wc-notice-modal.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none !important;
    transform: translateY(0) scale(1) !important;
}

.rp-wc-notice-modal__box,
.rp-wc-notice-toast__box {
    width: min(100%, 760px) !important;
    min-height: 52px !important;
    padding: 10px 12px 10px 14px !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    border-radius: 16px !important;
    background: var(--rp-theme-general-accent, var(--rp-accent, #fd314a)) !important;
    background-color: var(--rp-theme-general-accent, var(--rp-accent, #fd314a)) !important;
    color: #fff !important;
    box-shadow: 0 18px 42px rgba(0, 126, 96, .26) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    text-align: right !important;
    pointer-events: auto !important;
    box-sizing: border-box !important;
}

.rp-wc-notice-toast__icon {
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .22) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.rp-wc-notice-modal__content,
.rp-wc-notice-toast__content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.9 !important;
    text-align: right !important;
}

.rp-wc-notice-modal__content *,
.rp-wc-notice-toast__content * {
    color: #fff !important;
}

.rp-wc-notice-modal__content ul,
.rp-wc-notice-modal__content ol,
.rp-wc-notice-toast__content ul,
.rp-wc-notice-toast__content ol {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.rp-wc-notice-modal__content li,
.rp-wc-notice-toast__content li {
    margin: 0 !important;
    padding: 0 !important;
}

.rp-wc-notice-modal__content a,
.rp-wc-notice-toast__content a {
    color: #fff !important;
    font-weight: 800 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
}

.rp-wc-notice-toast__separator {
    display: block !important;
    width: 100% !important;
    height: 1px !important;
    margin: 8px 0 !important;
    background: rgba(255, 255, 255, .22) !important;
}

.rp-wc-notice-modal__close,
.rp-wc-notice-toast__close {
    flex: 0 0 auto !important;
    min-height: 34px !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: #fff !important;
    background-color: #fff !important;
    color: #009874 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 34px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

.rp-wc-notice-modal__close:hover,
.rp-wc-notice-toast__close:hover {
    background: rgba(255, 255, 255, .92) !important;
    color: #007f62 !important;
}

.woocommerce-notices-wrapper [data-rp-wc-notice-consumed="true"],
.woocommerce [data-rp-wc-notice-consumed="true"],
[data-rp-wc-notice-consumed="true"] {
    display: none !important;
}

@media (max-width: 768px) {
    .rp-wc-notice-modal.rp-wc-notice-toast,
    .rp-wc-notice-modal {
        right: 12px !important;
        left: 12px !important;
        inset: auto 12px auto 12px !important;
        max-width: none !important;
    }

    .rp-wc-notice-modal__box,
    .rp-wc-notice-toast__box {
        width: 100% !important;
        padding: 10px 10px 10px 12px !important;
        gap: 8px !important;
    }

    .rp-wc-notice-modal__content,
    .rp-wc-notice-toast__content {
        font-size: 12.5px !important;
        line-height: 1.8 !important;
    }

    .rp-wc-notice-modal__close,
    .rp-wc-notice-toast__close {
        min-height: 32px !important;
        padding: 0 11px !important;
        font-size: 11.5px !important;
        line-height: 32px !important;
    }
}

/* never show empty cart badges in header/mobile footer */
.rp-cart-dot[hidden],
.rp-mobile-bottom-count[hidden],
.rp-cart-link.is-empty-cart .rp-cart-dot,
.rp-mobile-bottom-link.is-cart.is-empty-cart .rp-mobile-bottom-count {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.rp-cart-link.is-empty-cart .rp-cart-dot,
.rp-mobile-bottom-link.is-cart.is-empty-cart .rp-mobile-bottom-icon::before,
.rp-mobile-bottom-link.is-cart:not(.has-cart) .rp-mobile-bottom-icon::before,
html.rp-cart-is-empty .rp-mobile-bottom-link.is-cart .rp-mobile-bottom-icon::before,
body.rp-cart-is-empty .rp-mobile-bottom-link.is-cart .rp-mobile-bottom-icon::before {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* option-required notice as green toast, not modal overlay */
body.rp-product-modal-open,
body.rp-product-option-toast-open,
body.woocommerce-shop.rp-product-modal-open,
body.post-type-archive-product.rp-product-modal-open,
body.tax-product_cat.rp-product-modal-open,
body.tax-product_tag.rp-product-modal-open,
body.single-product.rp-product-modal-open,
body.woocommerce-cart.rp-product-modal-open {
    overflow: auto !important;
    overflow-y: auto !important;
}

.rp-product-option-required-modal.rp-product-option-required-toast,
body.woocommerce-shop .rp-product-option-required-modal.rp-product-option-required-toast,
body.post-type-archive-product .rp-product-option-required-modal.rp-product-option-required-toast,
body.tax-product_cat .rp-product-option-required-modal.rp-product-option-required-toast,
body.tax-product_tag .rp-product-option-required-modal.rp-product-option-required-toast,
body.single-product .rp-product-option-required-modal.rp-product-option-required-toast,
body.woocommerce-cart .rp-product-option-required-modal.rp-product-option-required-toast,
.rp-shop-archive .rp-product-option-required-modal.rp-product-option-required-toast {
    position: fixed !important;
    top: calc(14px + env(safe-area-inset-top, 0px)) !important;
    right: 16px !important;
    left: 16px !important;
    bottom: auto !important;
    inset: auto 16px auto 16px !important;
    z-index: 1000003 !important;
    width: auto !important;
    max-width: 760px !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    direction: rtl !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-12px) scale(.98) !important;
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease !important;
    box-sizing: border-box !important;
}

.rp-product-option-required-modal.rp-product-option-required-toast.is-open,
body.woocommerce-shop .rp-product-option-required-modal.rp-product-option-required-toast.is-open,
body.post-type-archive-product .rp-product-option-required-modal.rp-product-option-required-toast.is-open,
body.tax-product_cat .rp-product-option-required-modal.rp-product-option-required-toast.is-open,
body.tax-product_tag .rp-product-option-required-modal.rp-product-option-required-toast.is-open,
body.single-product .rp-product-option-required-modal.rp-product-option-required-toast.is-open,
body.woocommerce-cart .rp-product-option-required-modal.rp-product-option-required-toast.is-open,
.rp-shop-archive .rp-product-option-required-modal.rp-product-option-required-toast.is-open {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none !important;
    transform: translateY(0) scale(1) !important;
}

.rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__box,
.rp-product-option-required-toast__box,
body.woocommerce-shop .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__box,
body.post-type-archive-product .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__box,
body.tax-product_cat .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__box,
body.tax-product_tag .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__box,
body.single-product .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__box,
body.woocommerce-cart .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__box,
.rp-shop-archive .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__box {
    width: min(100%, 760px) !important;
    min-height: 52px !important;
    padding: 10px 12px 10px 14px !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    border-radius: 16px !important;
    background: var(--rp-theme-general-accent, var(--rp-accent, #fd314a)) !important;
    background-color: var(--rp-theme-general-accent, var(--rp-accent, #fd314a)) !important;
    color: #fff !important;
    box-shadow: 0 18px 42px rgba(0, 126, 96, .26) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    text-align: right !important;
    pointer-events: auto !important;
    box-sizing: border-box !important;
}

.rp-product-option-required-toast__icon {
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .22) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__message,
.rp-product-option-required-toast__message,
body.woocommerce-shop .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__message,
body.post-type-archive-product .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__message,
body.tax-product_cat .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__message,
body.tax-product_tag .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__message,
body.single-product .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__message,
body.woocommerce-cart .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__message,
.rp-shop-archive .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__message {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.9 !important;
    text-align: right !important;
}

.rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__close,
.rp-product-option-required-toast__close,
body.woocommerce-shop .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__close,
body.post-type-archive-product .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__close,
body.tax-product_cat .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__close,
body.tax-product_tag .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__close,
body.single-product .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__close,
body.woocommerce-cart .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__close,
.rp-shop-archive .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__close {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: #fff !important;
    background-color: #fff !important;
    color: #009874 !important;
    font-family: var(--rp-font) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 34px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

.rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__close:hover,
.rp-product-option-required-toast__close:hover {
    background: rgba(255, 255, 255, .92) !important;
    color: #007f62 !important;
}

@media (max-width: 768px) {
    .rp-product-option-required-modal.rp-product-option-required-toast,
    body.woocommerce-shop .rp-product-option-required-modal.rp-product-option-required-toast,
    body.post-type-archive-product .rp-product-option-required-modal.rp-product-option-required-toast,
    body.tax-product_cat .rp-product-option-required-modal.rp-product-option-required-toast,
    body.tax-product_tag .rp-product-option-required-modal.rp-product-option-required-toast,
    body.single-product .rp-product-option-required-modal.rp-product-option-required-toast,
    body.woocommerce-cart .rp-product-option-required-modal.rp-product-option-required-toast,
    .rp-shop-archive .rp-product-option-required-modal.rp-product-option-required-toast {
        right: 12px !important;
        left: 12px !important;
        inset: auto 12px auto 12px !important;
        max-width: none !important;
    }

    .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__box,
    .rp-product-option-required-toast__box {
        width: 100% !important;
        padding: 10px 10px 10px 12px !important;
        gap: 8px !important;
    }

    .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__message,
    .rp-product-option-required-toast__message {
        font-size: 12.5px !important;
        line-height: 1.8 !important;
    }

    .rp-product-option-required-modal.rp-product-option-required-toast .rp-product-option-required-modal__close,
    .rp-product-option-required-toast__close {
        min-height: 32px !important;
        padding: 0 11px !important;
        font-size: 11.5px !important;
        line-height: 32px !important;
    }
}


/* v0.1.635: force LTR direction for email, postcode and national-code fields/values everywhere. */
input[type="email"],
input[name="email"],
input[name="billing_email"],
input[name="account_email"],
input[id="billing_email"],
input[id="account_email"],
input[id="reg_email"],
input[name*="postcode"],
input[id*="postcode"],
input[name*="post_code"],
input[id*="post_code"],
input[name*="postal"],
input[id*="postal"],
input[name*="zip"],
input[id*="zip"],
input[name*="national"],
input[id*="national"],
input[name*="melli"],
input[id*="melli"],
input[name*="codemelli"],
input[id*="codemelli"],
.rp-ltr-value {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: plaintext !important;
}

input[type="email"]::placeholder,
input[name="billing_email"]::placeholder,
input[name="account_email"]::placeholder,
input[name*="postcode"]::placeholder,
input[id*="postcode"]::placeholder,
input[name*="national"]::placeholder,
input[id*="national"]::placeholder {
    direction: ltr !important;
    text-align: left !important;
}

/* Keep punctuation, numbers and mixed inline fragments at the visual end of
   live Persian messages. English/LTR documents retain their native direction. */
html[dir="rtl"] body :where([role="status"], [aria-live="polite"], [aria-live="assertive"]) {
    direction: rtl;
    unicode-bidi: plaintext;
}
/* Theme Color to Blog integration bridge. Blog layout CSS remains independent;
   only cross-domain accent mapping lives in the global integration layer. */
body.rp-theme-color-preset-dark.blog .rp-blog-home > .rp-blog-archive-strip.is-carousel .rp-blog-archive-pills > a:is(:hover, :focus-visible) {
    border-color: var(--rp-theme-general-accent, #3b82f6) !important;
}

body.rp-theme-color-preset-dark.blog .rp-blog-home > .rp-blog-archive-strip.is-carousel .rp-blog-archive-pills > a:is(:hover, :focus-visible) > strong,
body.rp-theme-color-preset-dark.blog .rp-blog-home .rp-blog-card-title > a:is(:hover, :focus-visible) {
    color: var(--rp-theme-general-accent, #3b82f6) !important;
}

body.rp-theme-color-preset-dark.blog .rp-blog-home > .rp-blog-feature-carousel .rp-blog-card--tl-featured:is(:hover, :focus-within) {
    border-color: var(--rp-theme-general-accent, #3b82f6) !important;
}

body.single-post .rp-blog-single-sidebar--tech .rp-blog-sidebar-post:is(:hover, :focus-visible),
body.single-post .rp-blog-single-sidebar--tech .rp-blog-sidebar-post:is(:hover, :focus-visible) strong {
    color: var(--rp-theme-general-accent, #fd314a) !important;
}

/* Guest comment identity dialog shared by posts and product reviews. */
body.rp-comment-identity-modal-open {
    overflow: hidden !important;
}

.rp-comment-identity-modal[hidden] {
    display: none !important;
}

.rp-comment-identity-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000 !important;
    display: grid !important;
    place-items: center !important;
    padding: 18px !important;
}

.rp-comment-identity-modal__backdrop {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(8, 15, 24, .64) !important;
    backdrop-filter: blur(3px);
}

.rp-comment-identity-modal__dialog {
    position: relative !important;
    z-index: 1 !important;
    width: min(100%, 420px) !important;
    display: grid !important;
    gap: 12px !important;
    padding: 24px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    background: #fff !important;
    color: #172033 !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24) !important;
    direction: rtl !important;
}

.rp-comment-identity-modal__dialog h3,
.rp-comment-identity-modal__dialog p {
    margin: 0 !important;
}

.rp-comment-identity-modal__intro {
    color: #64748b !important;
    font-size: 12px !important;
}

.rp-comment-identity-modal .comment-form-author,
.rp-comment-identity-modal .comment-form-phone,
.rp-comment-identity-modal .comment-form-email {
    display: grid !important;
    gap: 6px !important;
    margin: 0 !important;
}

.rp-comment-identity-modal label {
    font-size: 12px !important;
    font-weight: 700 !important;
}

.rp-comment-identity-modal input {
    width: 100% !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
    padding: 8px 12px !important;
    border: 1px solid #d8e0ea !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: #172033 !important;
}

.rp-comment-identity-modal input:focus {
    outline: 0 !important;
    border-color: var(--rp-theme-forms-focus, var(--rp-theme-general-accent, #fd314a)) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rp-theme-forms-focus, var(--rp-theme-general-accent, #fd314a)) 14%, transparent) !important;
}

/* iOS zooms focused form controls below 16px. This dialog is shared by blog
   comments and product reviews, so keep its mobile text inputs platform-safe. */
@media (max-width: 767px) {
    .rp-comment-identity-modal input {
        font-size: 16px !important;
    }
}

.rp-comment-identity-modal__close {
    position: absolute !important;
    top: 10px !important;
    left: 12px !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    font-size: 22px !important;
    cursor: pointer !important;
}

.rp-comment-identity-modal__confirm {
    min-height: 44px !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: var(--rp-theme-forms-button, var(--rp-theme-general-accent, #fd314a)) !important;
    color: var(--rp-theme-forms-button-text, var(--rp-theme-general-on-accent, #fff)) !important;
    font-weight: 800 !important;
    cursor: pointer !important;
}

.rp-comment-identity-modal__error {
    color: #c62828 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

:is(
    body.rp-theme-color-preset-dark,
    body.rp-theme-dark,
    body.is-dark,
    html[data-rp-user-theme="dark"] body,
    html[data-rp-theme-mode="dark"] body
) .rp-comment-identity-modal__dialog {
    border-color: #2d3748 !important;
    background: #151b24 !important;
    color: #f8fafc !important;
}

:is(
    body.rp-theme-color-preset-dark,
    body.rp-theme-dark,
    body.is-dark,
    html[data-rp-user-theme="dark"] body,
    html[data-rp-theme-mode="dark"] body
) .rp-comment-identity-modal input {
    border-color: #3a4657 !important;
    background: #0f141c !important;
    color: #f8fafc !important;
}

/* The close control belongs to the dark dialog surface as well: avoid the
   Light-mode button fill while keeping the dismissal icon legible. */
:is(
    body.rp-theme-color-preset-dark,
    body.rp-theme-dark,
    body.is-dark,
    html[data-rp-user-theme="dark"] body,
    html[data-rp-theme-mode="dark"] body
) .rp-comment-identity-modal__close {
    border: 1px solid #3a4657 !important;
    background: #0f141c !important;
    color: #f8fafc !important;
}
/* Nested review replies keep their hierarchy, but never inherit ordered-list numbers. */
body:is(.single-post, .single-product) .rp-product-review-items :is(ol, ul).children,
body:is(.single-post, .single-product) .rp-product-review-items :is(ol, ul).children > li {
    list-style: none !important;
}

/* The JS creates this Mobile-only control on every viewport. Keep it hidden
   until a long comment is measured inside the Mobile breakpoint. */
.rp-mobile-comment-copy__toggle {
    display: none;
}

@media (max-width: 767px) {
    .rp-mobile-comment-copy {
        position: relative;
        min-width: 0;
    }

    .rp-mobile-comment-copy__content {
        position: relative;
        overflow: hidden;
        max-height: none;
        transition: max-height 180ms ease;
    }

    .rp-mobile-comment-copy.is-collapsible:not(.is-expanded) .rp-mobile-comment-copy__content {
        max-height: calc(var(--rp-mobile-comment-line-height, 2em) * 4);
    }

    .rp-mobile-comment-copy.is-collapsible.is-expanded .rp-mobile-comment-copy__content {
        max-height: var(--rp-mobile-comment-full-height, none);
    }

    .rp-mobile-comment-copy.is-collapsible:not(.is-expanded)::after {
        content: "";
        position: absolute;
        z-index: 1;
        right: 0;
        bottom: 30px;
        left: 0;
        height: var(--rp-mobile-comment-line-height, 2em);
        pointer-events: none;
        background: linear-gradient(to bottom, transparent, var(--rp-mobile-comment-fade-bg, #fff));
    }

    .rp-mobile-comment-copy__toggle {
        position: relative;
        z-index: 2;
        width: 28px;
        height: 28px;
        margin: 4px 0 0 auto;
        padding: 0;
        border: 1px solid currentColor;
        border-radius: 999px;
        background: transparent;
        color: inherit;
        cursor: pointer;
    }

    .rp-mobile-comment-copy.is-collapsible .rp-mobile-comment-copy__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .rp-mobile-comment-copy__toggle::before {
        content: "";
        width: 7px;
        height: 7px;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: translateY(-2px) rotate(45deg);
        transition: transform 180ms ease;
    }

    .rp-mobile-comment-copy.is-expanded .rp-mobile-comment-copy__toggle::before {
        transform: translateY(2px) rotate(225deg);
    }

    :is(
        body.rp-theme-color-preset-dark,
        body.rp-theme-dark,
        body.is-dark,
        html[data-rp-user-theme="dark"] body,
        html[data-rp-theme-mode="dark"] body
    ) .rp-mobile-comment-copy {
        --rp-mobile-comment-fade-bg: #111820;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rp-mobile-comment-copy__content { transition: none; }
}

/* Normal dialogs leave document scrolling enabled; drawers and sheets keep their owners. */
html body:is(.rp-comment-identity-modal-open, .rp-account-address-modal-open, .rp-share-open, .rp-welcome-modal-open, .rp-product-lightbox-open):not(.rp-product-modal-open):not(.rp-mobile-menu-open):not(.rp-product-review-sheet-open):not(.rp-blog-reply-open) {
  overflow: visible !important;
  overscroll-behavior: auto !important;
}
/* The shared motion service owns ordinary modal animations. */
html body :is(.rp-share-overlay, .rp-share-dialog, .rp-account-address-modal, .rp-account-address-modal__dialog, .rp-comment-identity-modal, .rp-comment-identity-modal__dialog, .rp-comment-vote-modal, .rp-welcome-modal, .rp-welcome-modal__dialog, .rp-product-gallery-lightbox-overlay, .rp-product-gallery-lightbox-panel) {
  animation: none !important;
  transition: none !important;
}

/* Shared frontend tab timing matches checkout address panels. */
body:not(.wp-admin) :is([role=tab], .wc-tabs a, [data-rp-modal-tab]) {
  transition: background-color .22s ease, color .22s ease, box-shadow .22s ease;
}
/* One animation owner: native content transitions must not compete with height motion. */
html body details[data-rp-disclosure-motion]::details-content {
  transition: none !important;
  animation: none !important;
}
@media(prefers-reduced-motion:reduce) {
 body:not(.wp-admin) :is([role=tab], .wc-tabs a, [data-rp-modal-tab]) {transition:none !important;}
}

/* Subtle frontend text-link feedback, including button-based text links. */
@media (prefers-reduced-motion: no-preference) {
  body:not(.wp-admin) a[href]:not(.button):not([role=tab]):not([class*=modal-close]):not(.rp-checkout-products-slide-link),
  body:not(.wp-admin) button.rp-wct-carrier-short-description {
    transition-property: color, background-color, border-color, opacity, box-shadow, transform;
    transition-duration: 140ms;
    transition-timing-function: ease-out;
  }
}

/* Low-specificity size motion: component transitions remain authoritative. */
@media (prefers-reduced-motion: no-preference) {
  :where(body:not(.wp-admin)) :where(a, button, summary, summary span, summary svg, img, [role=button]) {
    transition: transform 140ms ease-out, scale 140ms ease-out, font-size 140ms ease-out, line-height 140ms ease-out;
  }
}
