/* Native cart and wishlist notifications, restyled with Safqa's catalog tokens. */
body.theme-safqa .ui-widget-overlay[data-ca-notification-key] {
    z-index: 1100 !important;
    background: rgba(15, 24, 31, .58) !important;
    opacity: 1 !important;
    backdrop-filter: blur(3px);
}

body.theme-safqa .cm-notification-content-extended:has(.ty-product-notification__body),
body.theme-safqa .cm-notification-content-extended:has(#wishlist_notification_dialog) {
    position: fixed !important;
    z-index: 1101 !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    width: min(680px, calc(100vw - 32px)) !important;
    max-width: none !important;
    max-height: min(720px, calc(100vh - 32px)) !important;
    overflow: auto !important;
    padding: 0 !important;
    border: 1px solid #d8dfdc !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 24px 80px rgba(15, 24, 31, .28) !important;
    color: #172434 !important;
    direction: rtl !important;
    text-align: right !important;
    transform: translate(-50%, -50%) !important;
}

body.theme-safqa .cm-notification-content-extended:has(.ty-product-notification__body)::before,
body.theme-safqa .cm-notification-content-extended:has(#wishlist_notification_dialog)::before {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    border-radius: 16px 16px 0 0;
    background: #1f5945;
    content: "";
}

body.theme-safqa .cm-notification-content-extended:has(.ty-product-notification__body) h1,
body.theme-safqa .cm-notification-content-extended:has(#wishlist_notification_dialog) h1 {
    display: flex !important;
    min-height: 76px !important;
    margin: 0 !important;
    padding: 20px 70px 18px 28px !important;
    align-items: center !important;
    border: 0 !important;
    border-bottom: 1px solid #e4e9e6 !important;
    background: #fbfcfb !important;
    color: #172434 !important;
    font-family: "Noto Sans Arabic", sans-serif !important;
    font-size: 23px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
}

body.theme-safqa .cm-notification-content-extended:has(.ty-product-notification__body) h1::before,
body.theme-safqa .cm-notification-content-extended:has(#wishlist_notification_dialog) h1::before {
    display: inline-grid;
    width: 28px;
    height: 28px;
    margin-inline-end: 11px;
    place-items: center;
    border-radius: 50%;
    background: #1f8a70;
    color: #fff;
    content: "\2713";
    font-family: sans-serif;
    font-size: 17px;
    font-weight: 800;
}

body.theme-safqa .cm-notification-content-extended:has(.ty-product-notification__body) h1 .cm-notification-close,
body.theme-safqa .cm-notification-content-extended:has(#wishlist_notification_dialog) h1 .cm-notification-close {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    display: grid !important;
    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    place-items: center !important;
    border: 1px solid #d8dfdc !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #65716e !important;
    cursor: pointer !important;
}

body.theme-safqa .cm-notification-content-extended:has(.ty-product-notification__body) h1 .cm-notification-close::before,
body.theme-safqa .cm-notification-content-extended:has(#wishlist_notification_dialog) h1 .cm-notification-close::before {
    content: "\00d7";
    font-family: Arial, sans-serif;
    font-size: 29px;
    font-weight: 300;
    line-height: 1;
}

body.theme-safqa .cm-notification-content-extended:has(.ty-product-notification__body) h1 .cm-notification-close:hover,
body.theme-safqa .cm-notification-content-extended:has(#wishlist_notification_dialog) h1 .cm-notification-close:hover {
    border-color: #1f5945 !important;
    color: #1f5945 !important;
}

body.theme-safqa .cm-notification-content-extended:has(.ty-product-notification__body) .notification-body-extended,
body.theme-safqa .cm-notification-content-extended:has(#wishlist_notification_dialog) .notification-body-extended {
    padding: 0 !important;
    background: #fff !important;
}

body.theme-safqa .cm-product-notification-body.ty-product-notification__body,
body.theme-safqa .ty-wishlist-popup {
    max-height: none !important;
    margin: 0 !important;
    padding: 24px 28px 18px !important;
    overflow: visible !important;
    background: transparent !important;
}

body.theme-safqa .ty-product-notification__item,
body.theme-safqa .ty-wishlist-popup__product {
    display: grid !important;
    grid-template-columns: 92px minmax(0, 1fr) !important;
    gap: 18px !important;
    margin: 0 !important;
    padding: 0 0 20px !important;
    align-items: center !important;
    border: 0 !important;
    border-bottom: 1px solid #e4e9e6 !important;
}

body.theme-safqa .ty-product-notification__image,
body.theme-safqa .ty-wishlist-popup__product img {
    display: block !important;
    width: 92px !important;
    height: 92px !important;
    box-sizing: border-box !important;
    padding: 6px !important;
    border: 1px solid #e1e7e4 !important;
    border-radius: 10px !important;
    background: #fff !important;
    object-fit: contain !important;
}

body.theme-safqa .ty-product-notification__content,
body.theme-safqa .ty-wishlist-popup__product-info {
    display: flex !important;
    min-width: 0 !important;
    flex-direction: column !important;
    gap: 7px !important;
}

body.theme-safqa .ty-product-notification__product-name,
body.theme-safqa .ty-wishlist-popup__product-name {
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    color: #172434 !important;
    font-family: "Noto Sans Arabic", sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.55 !important;
    text-decoration: none !important;
}

body.theme-safqa .ty-product-notification__product-name:hover,
body.theme-safqa .ty-wishlist-popup__product-name:hover { color: #1f5945 !important; }

body.theme-safqa .ty-product-notification__price,
body.theme-safqa .ty-wishlist-popup__product-price {
    color: #172434 !important;
    font-family: Outfit, "Noto Sans Arabic", sans-serif !important;
    font-size: 19px !important;
    font-weight: 800 !important;
}

body.theme-safqa .ty-product-notification__divider { display: none !important; }

body.theme-safqa .ty-product-notification__total-info {
    display: flex !important;
    margin: 0 !important;
    padding: 18px 0 0 !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    color: #65716e !important;
    font-size: 14px !important;
}

body.theme-safqa .ty-product-notification__amount,
body.theme-safqa .ty-product-notification__subtotal { float: none !important; }
body.theme-safqa .ty-product-notification__subtotal { color: #172434 !important; font-size: 17px !important; font-weight: 800 !important; }

body.theme-safqa .cm-product-notification-buttons.ty-product-notification__buttons,
body.theme-safqa .ty-wishlist-popup__buttons {
    display: flex !important;
    margin: 0 !important;
    padding: 18px 28px 26px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    border-top: 1px solid #e4e9e6 !important;
    background: #f7f9f8 !important;
}

body.theme-safqa .cm-product-notification-buttons .ty-btn,
body.theme-safqa .ty-wishlist-popup__buttons .ty-btn {
    display: inline-flex !important;
    min-height: 44px !important;
    padding: 0 20px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    font-family: "Noto Sans Arabic", sans-serif !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

body.theme-safqa .cm-product-notification-buttons .ty-btn__primary {
    order: 1;
    border: 1px solid #e9bd00 !important;
    background: #ffd814 !important;
    color: #172434 !important;
}

body.theme-safqa .cm-product-notification-buttons .ty-btn__secondary,
body.theme-safqa .ty-wishlist-popup__buttons .ty-btn {
    border: 1px solid #bdc8c3 !important;
    background: #fff !important;
    color: #1f5945 !important;
}

body.theme-safqa .cm-product-notification-buttons .ty-btn:hover { transform: translateY(-1px); }
body.theme-safqa .cm-product-notification-buttons .ty-btn__primary:hover { background: #f7ca00 !important; }
body.theme-safqa .cm-product-notification-buttons .ty-btn__secondary:hover,
body.theme-safqa .ty-wishlist-popup__buttons .ty-btn:hover { border-color: #1f5945 !important; background: #f0f6f2 !important; }

body.theme-safqa .ty-wishlist-popup__title {
    display: none !important;
}

body.theme-safqa .ty-wishlist-popup__buttons {
    flex-wrap: wrap !important;
}

body.theme-safqa .ty-wishlist-popup__buttons .continue-shopping-link {
    color: #1f5945 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

@media (max-width: 600px) {
    body.theme-safqa .cm-notification-content-extended:has(.ty-product-notification__body),
    body.theme-safqa .cm-notification-content-extended:has(#wishlist_notification_dialog) {
        width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 20px) !important;
        border-radius: 13px !important;
    }

    body.theme-safqa .cm-notification-content-extended:has(.ty-product-notification__body) h1,
    body.theme-safqa .cm-notification-content-extended:has(#wishlist_notification_dialog) h1 {
        min-height: 67px !important;
        padding: 18px 58px 16px 18px !important;
        font-size: 18px !important;
    }

    body.theme-safqa .cm-notification-content-extended:has(.ty-product-notification__body) h1 .cm-notification-close,
    body.theme-safqa .cm-notification-content-extended:has(#wishlist_notification_dialog) h1 .cm-notification-close { top: 16px !important; left: 16px !important; }

    body.theme-safqa .cm-product-notification-body.ty-product-notification__body,
    body.theme-safqa .ty-wishlist-popup { padding: 18px !important; }

    body.theme-safqa .ty-product-notification__item,
    body.theme-safqa .ty-wishlist-popup__product { grid-template-columns: 72px minmax(0, 1fr) !important; gap: 12px !important; padding-bottom: 16px !important; }

    body.theme-safqa .ty-product-notification__image,
    body.theme-safqa .ty-wishlist-popup__product img { width: 72px !important; height: 72px !important; }

    body.theme-safqa .cm-product-notification-buttons.ty-product-notification__buttons,
    body.theme-safqa .ty-wishlist-popup__buttons { padding: 16px 18px 20px !important; }

    body.theme-safqa .cm-product-notification-buttons .ty-btn,
    body.theme-safqa .ty-wishlist-popup__buttons .ty-btn { width: 100% !important; }
}
