/*
 * form-ux-enhancements.css (v9 - full reset on buttons + number back to
 * matching the site's normal field alignment, not centered)
 * ----------------------------------------------------------------------
 */

.pi-qty-group {
    display: flex;
    align-items: stretch;
    height: 48px;
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #d7e0ea;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    padding: 0;
    margin: 0;
    transition: border-color .15s, box-shadow .15s;
}

.pi-qty-group:focus-within {
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.pi-qty-group.is-valid {
    border-color: #43a047;
}

.pi-qty-group.is-invalid {
    border-color: #c62828;
}

.pi-qty-group input[id^="quantity"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 100% !important;
    box-sizing: border-box !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    text-align: right !important;   /* matches every other field on the form - no forced centering */
    font-size: 16px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* באג שתוקן: זה הבית האמיתי של הבאג ביישור מספר הכמות. הכלל למעלה
   כופה text-align:right עם !important על כל שפה, כולל סינית — שום כלל
   בקבצי style.css/order-styles.css לא יכול היה לנצח !important, לא
   משנה כמה ספציפי. הכלל הבא ספציפי יותר (וגם !important), כך שהוא
   מנצח בוודאות עבור הגרסה הסינית בלבד, בלי לגעת בעברית/אנגלית. */
.lang-cn .pi-qty-group input[id^="quantity"] {
    text-align: left !important;
}

.pi-qty-group input[id^="quantity"]::-webkit-outer-spin-button,
.pi-qty-group input[id^="quantity"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.pi-qty-group input[id^="quantity"] {
    -moz-appearance: textfield;
}

/* Full reset first - neutralizes any site-wide "button { ... }" rule
   that would otherwise leak in and cause a gapped/independently-rounded
   look. Every needed property is re-declared explicitly right after. */
.pi-qty-group button.pi-qty-btn {
    all: unset;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 46px !important;
    width: 46px !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: #f5f9ff !important;
    color: #1565c0 !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s;
}

.pi-qty-group button.pi-qty-btn i {
    font-size: 15px;
    line-height: 1;
    pointer-events: none;
}

.pi-qty-group button.pi-qty-plus {
    border-left: 1.5px solid #e2ebf5 !important;
}
.pi-qty-group button.pi-qty-minus {
    border-right: 1.5px solid #e2ebf5 !important;
}

.pi-qty-group button.pi-qty-btn:hover {
    background: #e3f0ff !important;
}

.pi-qty-group button.pi-qty-btn:active {
    background: #d5e9ff !important;
}

.pi-qty-group button.pi-qty-btn:focus-visible {
    outline: 2px solid #1e88e5 !important;
    outline-offset: -2px;
}

@media (max-width: 380px) {
    .pi-qty-group { height: 44px; }
    .pi-qty-group button.pi-qty-btn { flex-basis: 40px !important; width: 40px !important; }
    .pi-qty-group button.pi-qty-btn i { font-size: 13px; }
}

/* ---- Trust badges (unchanged) ---- */
.pi-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin: 4px 0 14px;
    font-size: 12.5px;
    color: #667085;
}
.pi-trust-item { display: inline-flex; align-items: center; gap: 6px; }
.pi-trust-item i { color: #43a047; }

.pi-helper-added { opacity: 0.9; }
