/*
 * כתובת בקופה ובאזור האישי, לפי analysis/design/design-system.md (נתונים מקובצי ה-PSD):
 * כותרות #091F00, גוף #23351C, ירוק #507740, ירוק כהה #344E29, קו #D0D8C6 (1px), משני #ACBA9B,
 * שדות ברדיוס 25 ובגובה 50, שטוח (צל רק לחלון קופץ: מרחק 7, גודל 14), בסיס 18px.
 */

/* ---------- השלמה אוטומטית ---------- */
.mu-ac-wrap { position: relative; }
.mu-ac-list {
	position: absolute;
	inset-inline: 0;
	top: 100%;
	z-index: 50;
	margin: 4px 0 0;
	padding: 6px 0;
	list-style: none;
	max-height: 280px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #D0D8C6;
	border-radius: 20px;
	box-shadow: 0 7px 14px rgba(15, 14, 15, .12);
	font-size: 18px;
	text-align: start;
}
.mu-ac-list[hidden] { display: none; }
.mu-ac-item { padding: 10px 20px; min-height: 44px; display: flex; align-items: center; cursor: pointer; color: #23351C; }
.mu-ac-item[aria-selected="true"], .mu-ac-item:hover { background: #F4F4F4; color: #091F00; }
.mu-ac-alias { color: #507740; font-size: 16px; margin-inline-start: 4px; }
.mu-ac-empty { padding: 10px 20px; color: #23351C; font-size: 16px; }
.mu-ac-empty a { color: #507740; text-decoration: underline; }

/* ישראל היא המדינה היחידה (address-fields.php), אין טעם להציג בחירת מדינה */
.wc-block-components-address-form__country,
.woocommerce-address-fields #billing_country_field,
.woocommerce-address-fields #shipping_country_field { display: none !important; }

/* ---------- כן / לא עגולים (עיגול 30px, הנבחר ירוק כהה מלא) ---------- */
.mu-visually-hidden {
	position: absolute !important; width: 1px !important; height: 1px !important;
	overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; padding: 0 !important;
}
.mu-chips { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; min-height: 50px; }
.mu-chips .mu-chip {
	all: unset; box-sizing: border-box;
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px;
	cursor: pointer; font-family: inherit; font-size: 18px; line-height: 1; color: #23351C;
}
.mu-chip__dot { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #507740; background: #fff; flex: none; }
.mu-chip[aria-checked="true"] .mu-chip__dot { background: #344E29; border-color: #344E29; box-shadow: inset 0 0 0 7px #344E29; }
.mu-chips .mu-chip[aria-checked="true"] { color: #091F00; }
.mu-chips .mu-chip:focus-visible { outline: 2px solid #507740; outline-offset: 3px; border-radius: 25px; }
/* Hello Elementor צובע כל כפתור ב-hover / focus ברקע ורוד (#CC3366) ובטקסט לבן, ובנייד הפוקוס נשאר אחרי הקשה (QA-012, 15.11).
   הכפתורים שלנו נשארים שקופים. בריחוף העיגול מודגש, ובמקלדת נשארת טבעת הפוקוס הירוקה שלמעלה */
.mu-chips .mu-chip:hover, .mu-chips .mu-chip:focus, .mu-chips .mu-chip:focus-visible, .mu-chips .mu-chip:active {
	background: transparent !important; color: #23351C !important; border: 0 !important; box-shadow: none !important; text-decoration: none !important;
}
.mu-chips .mu-chip[aria-checked="true"]:hover, .mu-chips .mu-chip[aria-checked="true"]:focus, .mu-chips .mu-chip[aria-checked="true"]:active { color: #091F00 !important; }
.mu-chips .mu-chip:not([aria-checked="true"]):hover .mu-chip__dot { border-color: #344E29; box-shadow: inset 0 0 0 1px #344E29; }
/* בבלוק: המסגרת והחץ של ה-select לא רלוונטיים כשיש עיגולים */
.wc-blocks-components-select:has(.mu-chips) .wc-blocks-components-select__container { border: 0; background: none; box-shadow: none; }
.wc-blocks-components-select:has(.mu-chips) .wc-blocks-components-select__expand { display: none; }

/* ---------- הכתובות שלי: רשימה (0054) ---------- */
.mu-addr-list { max-width: 720px; }
.mu-addr {
	display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: start;
	padding: 6px 0 22px; border-bottom: 1px solid #D0D8C6;
}
.mu-addr__text { margin: 0; font-size: 18px; line-height: 1.55; color: #23351C; }
.mu-addr__actions { display: flex; flex-direction: column; gap: 4px; padding-inline-start: 24px; border-inline-start: 1px solid #D0D8C6; }
.mu-addr__actions form { margin: 0; }
.mu-addr__actions .mu-addr__action,
.woocommerce-account .woocommerce-MyAccount-content .mu-addr__actions button.mu-addr__action {
	all: unset; box-sizing: border-box;
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0;
	cursor: pointer; font-family: inherit; font-size: 16px; color: #507740 !important; text-decoration: none;
}
.mu-addr__actions .mu-addr__action:focus-visible { outline: 2px solid #507740; outline-offset: 3px; border-radius: 4px; }
.mu-addr__actions .mu-addr__action:hover { color: #344E29 !important; text-decoration: underline; background: none; }
.mu-addr-list .mu-form__actions { margin-top: 28px; }

/* ---------- הכתובות שלי: טופס (0055 / 0056) ---------- */
.mu-addr-form { max-width: 720px; }
.mu-addr-form .woocommerce-address-fields__field-wrapper {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px;
}
.mu-addr-form .woocommerce-address-fields__field-wrapper > .form-row { width: auto; float: none; margin: 0 0 18px; padding: 0; }
.mu-addr-form .woocommerce-address-fields__field-wrapper > .form-row[hidden] { display: none; }
.mu-addr-form .form-row.mu-wide { grid-column: 1 / -1; }
.mu-addr-form .mu-cond .optional { display: none; }
.mu-addr-form abbr.required { color: #FB0202; text-decoration: none; border: 0; }
@media (max-width: 640px) {
	.mu-addr-form .woocommerce-address-fields__field-wrapper { grid-template-columns: 1fr; }
	.mu-addr { grid-template-columns: 1fr; }
	.mu-addr__actions { flex-direction: row; gap: 24px; padding-inline-start: 0; border-inline-start: 0; }
}

/* בועת עזרה "?" ליד כן / לא (פריטים חלופיים, 0042) */
.mu-tip { position: relative; display: inline-block; margin-top: 6px; }
/* עקיפת עיצוב הכפתורים של התבנית (ורוד, פינות 3px) */
body .mu-tip button.mu-tip__btn { width: 28px !important; min-width: 0 !important; height: 28px !important; padding: 0 !important; border: 1px solid #507740 !important; border-radius: 50% !important; background: #fff !important; color: #507740 !important; font-size: 16px !important; font-weight: 700 !important; line-height: 1 !important; box-shadow: none !important; cursor: pointer; }
body .mu-tip button.mu-tip__btn:hover, body .mu-tip button.mu-tip__btn[aria-expanded="true"] { background: #507740 !important; color: #fff !important; }
.mu-tip__btn:focus-visible { outline: 2px solid #507740; outline-offset: 3px; }
.mu-tip__bubble { position: absolute; z-index: 20; top: calc(100% + 8px); inset-inline-start: 0; width: min(340px, calc(100vw - 48px)); padding: 14px 16px; border-radius: 20px; background: #fff; color: #23351C; font-size: 16px; line-height: 1.45; box-shadow: 0 7px 14px rgba(15, 14, 15, .12); }
.mu-tip__bubble[hidden] { display: none; }
.mu-tip__bubble p { margin: 0 0 8px; }
.mu-tip__bubble a { color: #507740; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- קופה: שדות הכתובת לפי עיצוב 0041 ומערכת העיצוב ---------- */
body .wc-block-checkout .wc-block-components-address-form { gap: 0 16px !important; }
body .wc-block-checkout .wc-block-components-address-form .wc-block-components-text-input input,
body .wc-block-checkout .wc-block-components-address-form .wc-blocks-components-select__select {
	min-height: 50px !important; border: 1px solid #D0D8C6 !important; border-radius: 25px !important; background: #fff !important;
	padding-inline: 22px !important; color: #23351C !important; font-size: 18px !important; box-shadow: none !important;
}
body .wc-block-checkout .wc-block-components-address-form .wc-block-components-text-input label { inset-inline-start: 23px !important; color: #23351C !important; }
body .wc-block-checkout .wc-block-components-address-form .wc-block-components-text-input input:focus { border-color: #507740 !important; box-shadow: 0 0 0 1px #507740 !important; outline: none !important; }
body .wc-block-checkout .wc-block-components-address-form .has-error input { border-color: #FB0202 !important; }
/* פריסה: שם | טלפון, יישוב | רחוב, ואז שורת השדות הקצרים */
body .wc-block-checkout .wc-block-components-address-form > * { flex: 0 0 100% !important; max-width: 100% !important; }
body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__first_name,
body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__phone,
body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__city,
body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__address_1 { flex-basis: calc(50% - 8px) !important; }
body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__mashtela-house-number,
body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__mashtela-apartment,
body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__mashtela-floor,
body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__mashtela-entrance-code { flex-basis: calc(25% - 12px) !important; }
body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-select-input-mashtela-building,
body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-select-input-mashtela-elevator { flex-basis: calc(50% - 8px) !important; }
@media (max-width: 700px) {
	body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__mashtela-house-number,
	body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__mashtela-apartment,
	body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__mashtela-floor,
	body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__mashtela-entrance-code { flex-basis: calc(50% - 8px) !important; }
	body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__first_name,
	body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__phone,
	body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__city,
	body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-address-form__address_1,
	body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-select-input-mashtela-building,
	body .wc-block-checkout .wc-block-components-address-form > .wc-block-components-select-input-mashtela-elevator { flex-basis: 100% !important; }
}
/* כן / לא: התווית מעל העיגולים (לא צפה בתוך שדה) */
body .wc-blocks-components-select:has(.mu-chips),
body .wc-blocks-components-select:has(.mu-chips) .wc-blocks-components-select__container { display: block !important; height: auto !important; overflow: visible !important; }
body .wc-blocks-components-select:has(.mu-chips) .wc-blocks-components-select__label {
	position: static !important; transform: none !important; display: block !important; margin: 0 0 2px !important;
	font-size: 16px !important; line-height: 1.3 !important; color: #23351C !important; white-space: normal !important;
}
body .wc-blocks-components-select:has(.mu-chips) .mu-help-line { position: static !important; white-space: normal !important; height: auto !important; min-height: 0 !important; line-height: 1.45 !important; font-size: 16px !important; margin: 6px 0 0 !important; padding: 0 !important; overflow: visible !important; }
body .wc-blocks-components-select:has(.mu-chips) .mu-chips { height: auto !important; }
/* במשלוח עד הבית כתובת החיוב = כתובת המשלוח (address.js מסמן), אין צורך באפשרות */
.wc-block-checkout__use-address-for-billing { display: none; }

/* טופס החיוב מוצג רק באיסוף עצמי (במשלוח עד הבית הוא זהה לכתובת המשלוח): לחשבונית מספיקים שם וטלפון */
body .wc-block-checkout__billing-fields .wc-block-components-address-form__city,
body .wc-block-checkout__billing-fields .wc-block-components-address-form__address_1 { display: none !important; }

/* ---------- "לבצע הזמנה": כפתור ראשי לפי 0043 ומערכת העיצוב (במקום מסגרת ורודה #CC3366 של התבנית) ---------- */
body .wc-block-checkout .wc-block-components-checkout-place-order-button {
	min-height: 50px !important; border: 0 !important; border-radius: 25px !important; background: #507740 !important;
	color: #FCF9F3 !important; font-family: inherit !important; font-size: 22px !important; font-weight: 400 !important;
	box-shadow: none !important; text-decoration: none !important;
}
body .wc-block-checkout .wc-block-components-checkout-place-order-button:hover,
body .wc-block-checkout .wc-block-components-checkout-place-order-button:focus-visible { background: #344E29 !important; }
body .wc-block-checkout .wc-block-components-checkout-place-order-button:focus-visible { outline: 2px solid #091F00 !important; outline-offset: 2px !important; }
/* אחרי הלחיצה (דף PayPlus פתוח) הכפתור מושבת ומציג ✓: שקט, כדי שלא ייראה כמו כפתור שני לתשלום */
body .wc-block-checkout .wc-block-components-checkout-place-order-button:disabled,
body .wc-block-checkout .wc-block-components-checkout-place-order-button[aria-disabled="true"] { background: #D0D8C6 !important; color: #23351C !important; cursor: default !important; }

/* ---------- QA-018: "משלוח" בלי יישוב עדיין (address.js מסמן body.mu-ship-noaddr ומוסיף .mu-noaddr-note) ---------- */
/* המקור ("אין אפשרויות משלוח זמינות...", "אין אפשרות משלוח זמינה") מוסתר לגמרי, כולל לקורא מסך, ובמקומו הנוסח שלנו */
body.mu-ship-noaddr .wc-block-components-shipping-rates-control__no-results-notice,
body.mu-ship-noaddr .wc-block-components-totals-shipping .wc-block-components-shipping-placeholder__value,
body.mu-ship-noaddr .wc-block-store-notice[data-mu-ship-wait] { display: none !important; }
body:not(.mu-ship-noaddr) .mu-noaddr-note { display: none !important; }
.mu-noaddr-place { font-size: 14px; }
