/* BrightNest — shared modal styles and the city/area dropdown (homepage hero + checkout). */

.bn-modal-open { overflow: hidden; }

/* Modal */
.bn-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .55); display: grid; place-items: center; padding: 20px; }
.bn-modal[hidden] { display: none; }
.bn-modal-box { width: min(520px, 100%); height: min(760px, 92vh); background: #fff; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--bn-shadow-lg); }
.bn-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--bn-line); }
.bn-modal-head h2 { font-size: 18px; margin: 0; }
.bn-modal-close { background: none; border: 0; cursor: pointer; padding: 4px; color: var(--bn-ink); display: grid; }

@media (max-width: 640px) {
	.bn-modal { padding: 0; }
	.bn-modal-box { width: 100%; height: 100%; border-radius: 0; }
}
@media (max-width: 480px) {
	.bn-modal-head { padding: 14px 16px; }
	.bn-modal-head h2 { font-size: 16px; line-height: 1.3; }
}
/* Area picker (searchable; city tabs, zone chips, popular areas) */
.bn-jx-dd { position: relative; z-index: 20; }
.bn-jx-dd [hidden] { display: none !important; }
.bn-jx-dd-btn {
	width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border: 1px solid var(--bn-line); border-radius: 12px;
	background: #fff; color: var(--bn-muted); font-size: 15px; text-align: start; cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.bn-jx-dd-btn .bn-icon { flex: 0 0 auto; color: var(--bn-brand); }
.bn-jx-dd-btn span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-jx-dd-btn.is-set span { color: var(--bn-ink); font-weight: 600; }
.bn-jx-dd-chev { flex: 0 0 auto; color: var(--bn-ink); transition: transform .2s; }
.bn-jx-dd-btn:hover, .bn-jx-dd.is-open .bn-jx-dd-btn { border-color: var(--bn-primary); box-shadow: 0 0 0 4px rgba(38, 45, 114, .08); }
.bn-jx-dd.is-open .bn-jx-dd-chev { transform: rotate(180deg); }
.bn-jx-dd-panel {
	position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 12px; border: 1px solid var(--bn-line); border-radius: 16px;
	background: #fff; box-shadow: 0 20px 44px rgba(28, 33, 86, .2); display: flex; flex-direction: column; gap: 10px;
}
.bn-jx-dd-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1.5px solid var(--bn-line); border-radius: 12px; color: var(--bn-muted); background: #f7f8fc; transition: border-color .2s, background .2s; }
.bn-jx-dd-search:focus-within { border-color: var(--bn-primary); background: #fff; }
.bn-jx-dd-search input { flex: 1; min-width: 0; padding: 12px 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--bn-ink); }

/* City tabs */
.bn-jx-dd-cities { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #f1f3f9; }
.bn-jx-dd-cities button {
	flex: 1; padding: 9px 8px; border: 0; border-radius: 9px; background: none; color: var(--bn-muted); font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.bn-jx-dd-cities button.is-active { background: #fff; color: var(--bn-primary); box-shadow: 0 1px 4px rgba(28, 33, 86, .12); }
.bn-jx-dd.is-searching .bn-jx-dd-cities { opacity: .45; }

/* Zone chips: one scrolling row */
.bn-jx-dd-zones { min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
html[dir="rtl"] .bn-jx-dd-zones { -webkit-mask-image: linear-gradient(270deg, #000 85%, transparent); mask-image: linear-gradient(270deg, #000 85%, transparent); }
.bn-jx-dd-zones::-webkit-scrollbar { display: none; }
.bn-jx-dd-zones button {
	flex: 0 0 auto; padding: 7px 12px; border: 1px solid var(--bn-line); border-radius: 99px; background: #fff; color: var(--bn-ink); font-size: 13px; cursor: pointer; white-space: nowrap;
}
.bn-jx-dd-zones button:hover { border-color: var(--bn-primary); }
.bn-jx-dd-zones button.is-active { background: var(--bn-primary); border-color: var(--bn-primary); color: #fff; }

/* List */
.bn-jx-dd-list { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px; }
.bn-jx-dd-city { position: sticky; top: 0; z-index: 1; margin: 0; padding: 10px 8px 6px; background: #fff; color: var(--bn-brand); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.bn-jx-dd-popular { margin-bottom: 4px; }
.bn-jx-dd-popular .bn-jx-dd-city { position: static; }
.bn-jx-dd-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 8px 8px; }
.bn-jx-dd-chips button {
	padding: 7px 12px; border: 0; border-radius: 99px; background: #fff1e8; color: #b34100; font-size: 14px; font-weight: 600; cursor: pointer;
}
.bn-jx-dd-chips button:hover, .bn-jx-dd-chips button:focus-visible { background: var(--bn-brand); color: #fff; outline: 0; }
.bn-jx-dd-chips button.is-active { background: var(--bn-brand); color: #fff; }
.bn-jx-dd-group ul { list-style: none; margin: 0 0 6px; padding: 0; }
.bn-jx-dd-group li { margin: 0; }
.bn-jx-dd-group button {
	width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 10px; background: none; text-align: start;
	color: var(--bn-ink); font-size: 15px; cursor: pointer;
}
.bn-jx-dd-group button .bn-icon { flex: 0 0 auto; color: #9aa3b8; }
.bn-jx-dd-name { flex: 1; min-width: 0; }
.bn-jx-dd-name b { color: var(--bn-primary); font-weight: 700; }
.bn-jx-dd-group button small { display: none; flex: 0 1 auto; max-width: 45%; color: var(--bn-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-jx-dd-group button:hover, .bn-jx-dd-group button:focus-visible { background: var(--bn-primary-soft); outline: 0; }
.bn-jx-dd-group button:hover .bn-icon { color: var(--bn-brand); }
.bn-jx-dd-group button.is-active { background: var(--bn-primary); color: #fff; font-weight: 600; }
.bn-jx-dd-group button.is-active .bn-icon, .bn-jx-dd-group button.is-active small { color: #fff; }
.bn-jx-dd-empty { padding: 22px 12px; text-align: center; color: var(--bn-muted); font-size: 14px; }
.bn-jx-dd-empty p { margin: 0 0 10px; }
.bn-jx-dd-empty a { display: inline-flex; align-items: center; gap: 6px; color: #128c4a; font-weight: 700; }
.bn-co-dd { max-width: 520px; margin: 14px 0 0; }
.bn-co-dd .bn-jx-dd-btn { padding: 11px 14px; }
.bn-co-dd .bn-jx-dd-panel { z-index: 30; }

/* First-visit area pop-up: the picker is always open inside it. */
.bn-gate { position: fixed; inset: 0; z-index: 10000; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; /* the column must not grow with the long zone row */ padding: 20px; background: rgba(15, 23, 42, .6); animation: bn-gate-in .2s ease; }
.bn-gate[hidden] { display: none; }
@keyframes bn-gate-in { from { opacity: 0; } to { opacity: 1; } }
.bn-gate-box {
	position: relative; width: min(560px, 100%); height: min(680px, calc(100vh - 40px)); display: flex; flex-direction: column;
	padding: 22px 22px 16px; border-radius: 20px; background: #fff; box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
}
.bn-gate-box > * { flex-shrink: 0; }
.bn-gate-head { display: flex; align-items: flex-start; gap: 12px; margin-block-end: 16px; }
.bn-gate-icon { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fff1e8; color: var(--bn-brand); }
.bn-gate-box h2 { margin: 0 0 4px; font-size: 20px; line-height: 1.3; color: var(--bn-ink); }
.bn-gate-head p { margin: 0; color: var(--bn-muted); font-size: 14px; }
.bn-gate-dd { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.bn-gate-dd .bn-jx-dd-btn { display: none; }
.bn-gate .bn-gate-dd .bn-jx-dd-panel[hidden] { display: flex !important; }
.bn-gate-dd .bn-jx-dd-panel { position: static; min-height: 0; flex: 1; padding: 0; border: 0; box-shadow: none; }
.bn-gate-dd .bn-jx-dd-list { flex: 1; max-height: none; min-height: 160px; }
@media (max-width: 640px) {
	.bn-gate { padding: 0; place-items: end stretch; }
	.bn-gate-box { width: 100%; height: 90vh; border-radius: 20px 20px 0 0; padding: 18px 16px 12px; }
	.bn-gate-box::before { content: ""; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #d9dce6; }
	.bn-gate-box h2 { font-size: 18px; }
	.bn-gate-icon { flex-basis: 38px; height: 38px; }
}

/* Offer pop-up after the area is chosen (template-parts/offer-popup.php) ----------------------- */
.bn-offer { position: fixed; inset: 0; z-index: 10001; display: grid; place-items: center; padding: 20px; background: rgba(15, 23, 42, .6); animation: bn-gate-in .2s ease; }
.bn-offer[hidden] { display: none; }
.bn-offer-box {
	position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 40px); overflow: auto; border-radius: 22px; background: #fff;
	box-shadow: 0 30px 80px rgba(15, 23, 42, .35); animation: bn-offer-pop .25s ease;
}
.bn-offer-box.is-image { max-width: 520px; background: transparent; box-shadow: 0 30px 80px rgba(15, 23, 42, .45); }
@keyframes bn-offer-pop { from { transform: translateY(12px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.bn-offer-close {
	position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .92); color: var(--bn-ink); cursor: pointer; box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
}
.bn-offer-close:hover { background: #fff; color: var(--bn-brand); }
.bn-offer-pic, .bn-offer-pic img { display: block; width: 100%; height: auto; border-radius: 22px; }
.bn-offer-top img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.bn-offer-body { padding: 34px 30px 22px; text-align: center; }
.bn-offer-badge {
	width: 104px; height: 104px; margin: 0 auto 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; color: #fff;
	background: radial-gradient(circle at 30% 25%, #ff8a2b, var(--bn-brand) 70%); box-shadow: 0 12px 28px rgba(242, 92, 5, .35), inset 0 0 0 6px rgba(255, 255, 255, .18);
}
.bn-offer-top + .bn-offer-body .bn-offer-badge { margin-top: -84px; border: 4px solid #fff; }
.bn-offer-badge strong { font-size: 30px; line-height: 1; font-weight: 800; }
.bn-offer-badge small { margin-top: 4px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.bn-offer-body h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.25; color: var(--bn-ink); }
.bn-offer-body > p { margin: 0 0 16px; color: #4b5470; font-size: 15px; line-height: 1.55; }
.bn-offer-code { padding: 10px 12px; border: 1px dashed #f3b48c; border-radius: 12px; background: #fff7f1; font-size: 14px !important; }
.bn-offer-code strong { color: var(--bn-brand); letter-spacing: .06em; }
.bn-offer-code span { color: var(--bn-muted); }
.bn-offer-later { margin-top: 10px; padding: 6px; border: 0; background: none; color: var(--bn-muted); font: inherit; font-size: 14px; cursor: pointer; }
.bn-offer-later:hover { color: var(--bn-ink); text-decoration: underline; }
@media (max-width: 480px) {
	.bn-offer-body { padding: 28px 20px 18px; }
	.bn-offer-body h2 { font-size: 21px; }
	.bn-offer-badge { width: 88px; height: 88px; }
	.bn-offer-badge strong { font-size: 25px; }
}
