/* =========================================================================
   מיני-קארט + משוב על כפתורי "הוסף לסל"
   ========================================================================= */

/* עוזר שאין לו מקבילה ב-Bootstrap 5.3 - מונע מטקסט ארוך למתוח את הפריט */
.min-width-0 {
    min-width: 0;
}

.gifty-mini-cart-panel {
    width: 100%;
    max-width: 420px;
}

.gifty-mini-cart-item .woocommerce-mini-cart-item__name,
.gifty-mini-cart-item a {
    word-break: break-word;
}

/* מסתירים את החיצים המובנים של input[type=number] כדי שהסטפר יישאר נקי */
.gifty-qty-input::-webkit-outer-spin-button,
.gifty-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.gifty-qty-input {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* מצב טעינה על גוף המיני-קארט */
#gifty-mini-cart.is-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.15s ease-in-out;
}

/* ווקומרס מוסיף מעצמו קישור "צפייה בסל" ליד כל כפתור הוספה - יש לנו מיני-קארט */
.added_to_cart {
    display: none !important;
}

/* משוב ויזואלי על כפתור ההוספה */
.gifty-add-to-cart.loading,
.btn.loading {
    pointer-events: none;
    opacity: 0.75;
}

.gifty-add-to-cart.gifty-added {
    background-color: var(--bs-success) !important;
    border-color: var(--bs-success) !important;
}

.gifty-cart-spin {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-left-color: transparent;
    border-radius: 50%;
    animation: gifty-cart-spin 0.6s linear infinite;
}

@keyframes gifty-cart-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gifty-cart-spin {
        animation-duration: 1.5s;
    }
}

/* ההודעות חייבות לצוף מעל מגירת הסל (z-index 1045 של Bootstrap) */
#gifty-toasts {
    z-index: 1090;
}

/* סרגל הניהול של וורדפרס יושב מעל offcanvas שממוקם ב-top:0, ומסתיר את הכותרת
   ואת כפתור הסגירה. הגבהים הם אלה שוורדפרס עצמו משתמש בהם. */
body.admin-bar .gifty-mini-cart-panel {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .gifty-mini-cart-panel {
        top: 46px;
    }
}
