/* =========================================================
   product-variants.css
   مسیر پیشنهادی: /websiteview/css/product-variants.css
   ========================================================= */

/* ---------- رنگ‌ها ---------- */
.js-variant-color + label {
    position: relative;
    border-color: #dddcdc;
}

/* رنگ ناموجود: کمرنگ + خط مورب، ولی قابل انتخاب */
.gp-color-rona:not(.pn-nd-bt) .swatch-element.is-unavailable label span {
    opacity: .35;
}

.gp-color-rona:not(.pn-nd-bt) .swatch-element.is-unavailable label::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -2px;
    right: -2px;
    height: 1px;
    background: #4B4B4D;
    transform: rotate(-45deg);
    pointer-events: none;
}

/* ---------- سایزها ---------- */
/* سایز ناموجود در این رنگ: خط‌خورده، قابل انتخاب برای «خبرم کن» */
.pn-nd-bt .swatch-element.is-unavailable label span {
    color: #b3b3b3;
    text-decoration: line-through;
}

.pn-nd-bt .swatch-element.is-unavailable input:checked ~ label span {
    color: #6f6f6f;
}

/* سایزی که اصلاً برای این رنگ تعریف نشده: غیرقابل انتخاب */
.pn-nd-bt .swatch-element.is-disabled label {
    cursor: not-allowed;
    pointer-events: none;
}

    .pn-nd-bt .swatch-element.is-disabled label span {
        color: #dcdcdc;
        text-decoration: line-through;
    }

/* ---------- پیام زیر گزینه‌ها ---------- */
.variant-hint {
    clear: both;
    direction: rtl;
    text-align: right;
    font-size: 13px;
    color: #808080;
    padding-top: 18px;
    line-height: 22px;
}

    .variant-hint:empty {
        display: none;
    }

    .variant-hint.is-warn {
        color: #D60000;
    }

/* ---------- دکمه در حالت «خبرم کن» ---------- */
.link-add.is-notify {
    background-color: #fff;
    color: #080808;
    border: 1px solid #080808;
    padding: 17px 0;
}

    .link-add.is-notify:hover {
        background-color: #080808;
        color: #fff;
    }

/* ---------- پاپ‌آپ ---------- */
.ntf-overlay[hidden],
.ntf-modal[hidden],
.ntf-step[hidden] {
    display: none !important;
}

.ntf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .30);
    backdrop-filter: blur(1px);
    z-index: 100000;
    opacity: 0;
    transition: opacity .25s;
}

.ntf-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 420px;
    max-width: 92vw;
    max-height: 90vh;
    overflow-y: auto;
    background: #FEFEFE;
    padding: 36px 28px 28px;
    z-index: 100001;
    direction: rtl;
    text-align: right;
    color: #080808;
    opacity: 0;
    transform: translate(-50%, -46%);
    transition: opacity .25s, transform .25s;
}

.ntf-open .ntf-overlay,
.ntf-open .ntf-modal {
    opacity: 1;
}

.ntf-open .ntf-modal {
    transform: translate(-50%, -50%);
}

.ntf-close {
    position: absolute;
    top: 16px;
    left: 18px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    line-height: 0;
}

.ntf-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ntf-desc {
    font-size: 13px;
    color: #808080;
    line-height: 22px;
    margin-bottom: 22px;
}

.ntf-product {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 0;
    border-top: .5px solid rgba(156, 155, 154, .5);
    border-bottom: .5px solid rgba(156, 155, 154, .5);
    margin-bottom: 22px;
}

    .ntf-product img {
        width: 64px;
        height: 84px;
        object-fit: cover;
        flex-shrink: 0;
    }

.ntf-product-name {
    font-size: 14px;
    margin-bottom: 10px;
}

.ntf-row {
    font-size: 13px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .ntf-row span {
        color: #808080;
    }

    .ntf-row b {
        font-weight: normal;
    }

.ntf-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: .5px solid #9C9B9A;
    display: inline-block;
}

.ntf-login-note {
    font-size: 13px;
    color: #808080;
    line-height: 22px;
    margin-bottom: 6px;
}

a.ntf-submit {
    line-height: 48px;
    text-align: center;
    text-decoration: none;
}

    a.ntf-submit:hover {
        color: #fff;
    }

.ntf-error {
    font-size: 12px;
    color: #D60000;
    min-height: 18px;
    padding-top: 6px;
}

.ntf-submit {
    display: block;
    width: 100%;
    height: 50px;
    margin-top: 10px;
    background: #080808;
    color: #fff;
    border: 1px solid #080808;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s;
}

    .ntf-submit:hover {
        background: #2c2c2c;
    }

    .ntf-submit:disabled {
        opacity: .6;
        cursor: wait;
    }

    .ntf-submit.ntf-outline {
        background: #fff;
        color: #080808;
    }

        .ntf-submit.ntf-outline:hover {
            background: #080808;
            color: #fff;
        }

.ntf-done {
    text-align: center;
    padding-top: 8px;
}

.ntf-check {
    display: block;
    margin: 0 auto 16px;
}

.ntf-done .ntf-title {
    color: #45BB00;
}

.ntf-close:focus-visible,
.ntf-submit:focus-visible,
.link-add:focus-visible {
    outline: 2px solid #080808;
    outline-offset: 2px;
}

body.ntf-lock {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .ntf-overlay, .ntf-modal {
        transition: none;
    }
}

@media only screen and (max-width: 760px) {
    /* روی موبایل پاپ‌آپ از پایین صفحه بالا میاد */
    .ntf-modal {
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        transform: translateY(20px);
        padding: 30px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    }

    .ntf-open .ntf-modal {
        transform: translateY(0);
    }
}


/* =========================================================
   انتخاب‌شده‌ها واضح‌تر
   ========================================================= */

/* رنگ انتخاب‌شده: حلقه‌ی مشکی دور دایره */
.gp-color-rona:not(.pn-nd-bt) .swatch {
    margin-left: 10px;
}

.gp-color-rona .swatch .color-rona input.js-variant-color:checked + label {
    border: 1px solid #fff !important;
    box-shadow: 0 0 0 2px #080808;
}

/* سایز انتخاب‌شده: خط زیر پررنگ + متن بولد */
.pn-nd-bt .swatch .color-rona input:checked ~ label {
    border-bottom: 2px solid #080808 !important;
}

    .pn-nd-bt .swatch .color-rona input:checked ~ label span {
        font-weight: bold;
        color: #080808;
    }

/* سایز انتخاب نشده و دکمه زده شده */
.pn-nd-bt.needs-size .p-cl-bx span {
    color: #D60000 !important;
}

.pn-nd-bt.needs-size #variantSizes {
    animation: ntf-shake .4s;
}

@keyframes ntf-shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pn-nd-bt.needs-size #variantSizes {
        animation: none;
    }
}
