/* EZ_UX_SAFE_START */
/* View only. No API. No fetch. No JSON. No business logic. */

html {
    scroll-behavior: smooth;
}

body {
    -webkit-text-size-adjust: 100%;
}

input,
textarea,
select {
    font-size: 16px !important;
}

textarea,
input[type="text"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="email"] {
    touch-action: manipulation;
}

.clean-products,
.clean-categories,
.popup-body,
.popup-card,
.popup-overlay,
.cart-list,
.cart-content,
.checkout-content,
.payment-content,
.orders-content,
.products-container,
.categories-container,
#productsContainer,
#categoriesContainer {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

#ezUxLoader {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 34%, rgba(0,31,91,.18), transparent 38%),
        rgba(255,255,255,.58);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}

#ezUxLoader.active {
    opacity: 1;
    visibility: visible;
}

.ez-ux-loader-card {
    width: 174px;
    min-height: 166px;
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(255,255,255,.86));
    box-shadow:
        0 26px 76px rgba(0,31,91,.23),
        inset 0 0 0 1px rgba(255,255,255,.88);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 13px;
    transform: translateY(8px) scale(.96);
    animation: ezUxLoaderIn .24s ease forwards;
}

.ez-ux-logo-ring {
    width: 82px;
    height: 82px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--theme-color,#001b4e), var(--button-color,#0d6efd));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 17px 38px rgba(0,31,91,.30);
}

.ez-ux-logo-ring:before {
    content: "";
    position: absolute;
    width: 140%;
    height: 140%;
    background: conic-gradient(from 0deg, transparent, rgba(255,255,255,.76), transparent 34%);
    animation: ezUxLoaderSpin 1.05s linear infinite;
}

.ez-ux-logo-ring img {
    position: relative;
    width: 62px;
    height: 62px;
    object-fit: contain;
    border-radius: 20px;
    background: #fff;
    padding: 7px;
}

.ez-ux-logo-fallback {
    position: relative;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background: #fff;
    color: var(--theme-color,#001b4e);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -1px;
}

.ez-ux-loader-text {
    color: var(--theme-color,#001b4e);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.ez-ux-loader-bar {
    width: 84px;
    height: 5px;
    border-radius: 99px;
    background: #e9eef8;
    overflow: hidden;
    position: relative;
}

.ez-ux-loader-bar span {
    position: absolute;
    inset: 0;
    width: 40%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--theme-color,#001b4e), var(--button-color,#0d6efd));
    animation: ezUxLoaderLine 1s ease-in-out infinite;
}

@keyframes ezUxLoaderSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes ezUxLoaderLine {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(280%);
    }
}

@keyframes ezUxLoaderIn {
    to {
        transform: translateY(0) scale(1);
    }
}

/* EZ_UX_SAFE_END */


/* EZ_UX_NOTES_FIX_START */
/* View only: stabilize notes field inside item popup */

#sizesBox:empty,
#addsBox:empty {
    display: none !important;
}

#popupNotes,
.popup-notes {
    display: block !important;
    width: 100% !important;
    min-height: 96px !important;
    max-height: 150px !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
    resize: none !important;
    position: relative !important;
    z-index: 25 !important;
    touch-action: manipulation !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    -webkit-text-size-adjust: 100% !important;
    scroll-margin-bottom: 180px !important;
}

.popup-body {
    overscroll-behavior: contain;
}

.popup-card.ez-notes-focus .popup-body {
    padding-bottom: 165px !important;
}

.popup-fixed-footer {
    z-index: 35 !important;
}

/* EZ_UX_NOTES_FIX_END */


/* EZ_UX_KEYBOARD_PRICE_FIX_START */
/* View only: iPhone keyboard popup stability + smooth price transition */

:root {
    --ez-keyboard-offset: 0px;
}

/* Notes field */
#popupNotes,
.popup-notes {
    font-size: 16px !important;
    line-height: 1.7 !important;
    min-height: 96px !important;
    max-height: 140px !important;
    resize: none !important;
    position: relative !important;
    z-index: 40 !important;
    touch-action: manipulation !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    -webkit-text-size-adjust: 100% !important;
}

/* When keyboard is open, make popup content visible above keyboard */
body.ez-keyboard-open #popupOverlay {
    align-items: flex-start !important;
    overflow-y: auto !important;
    padding-top: 8px !important;
    padding-bottom: calc(var(--ez-keyboard-offset, 280px) + 18px) !important;
    -webkit-overflow-scrolling: touch;
}

body.ez-keyboard-open #popupOverlay .popup-card {
    max-height: calc(100vh - var(--ez-keyboard-offset, 280px) - 16px) !important;
    height: auto !important;
    margin-top: 0 !important;
    overflow: hidden !important;
    transform: translateZ(0);
}

body.ez-keyboard-open #popupOverlay .popup-body {
    max-height: calc(100vh - var(--ez-keyboard-offset, 280px) - 245px) !important;
    overflow-y: auto !important;
    padding-bottom: 135px !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Keep footer above keyboard, not behind it */
body.ez-keyboard-open #popupOverlay .popup-fixed-footer {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 80 !important;
    background: rgba(255,255,255,.96) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Empty sizes/adds should not consume space */
#sizesBox:empty,
#addsBox:empty {
    display: none !important;
}

/* Smooth popup price change */
.popup-price {
    position: relative;
    transition: transform .18s ease, opacity .18s ease;
    will-change: transform, opacity;
}

.popup-price.ez-price-changing {
    opacity: .18;
    transform: translateY(-4px) scale(.985);
}

.popup-price.ez-price-ready {
    animation: ezPriceSoftIn .24s ease both;
}

@keyframes ezPriceSoftIn {
    0% {
        opacity: .25;
        transform: translateY(5px) scale(.985);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* EZ_UX_KEYBOARD_PRICE_FIX_END */


/* EZ_UX_TEXT_AND_OLD_LOADER_CLEAN_START */
/* View only: restore loader text + hide old loaders while new UX loader is active */

.ez-ux-loader-text {
    display: block !important;
    color: var(--theme-color,#001b4e);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    line-height: 1.5;
    min-height: 18px;
    margin-top: 1px;
    transition: opacity .18s ease, transform .18s ease;
}

.ez-ux-loader-card {
    width: 174px !important;
    min-height: 166px !important;
    gap: 13px !important;
}

/* لما اللودر الجديد شغال، اخفي أي لودر قديم بصريًا فقط */
body.ez-ux-active #clientLoader,
body.ez-ux-active #itemOpenLoader,
body.ez-ux-active #menuPremiumLoader,
body.ez-ux-active #ezGlobalLoader {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* منع أي فلاش من لودر قديم */
#itemOpenLoader,
#menuPremiumLoader,
#ezGlobalLoader {
    pointer-events: none !important;
}

/* EZ_UX_TEXT_AND_OLD_LOADER_CLEAN_END */

