/*!
 * ژوپین (Xupin) — ظاهر نقشه و انتخاب موقعیت (برگرفته از افزونه لوکیشن آوش)
 * نویسنده: سیامک یونسی — 09211710910 - 09126622567
 */
.gl-box { --gl-brand: var(--color-brand, var(--brand, #e11d48)); --gl-line: var(--color-line, #e5e7eb); --gl-muted: var(--color-muted, #64748b); --gl-ink: var(--color-ink, #0f172a); position: relative; }
.gl-box[hidden] { display: none !important; }
.gl-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.gl-head h2 { display: flex; align-items: center; gap: .5rem; font-weight: 800; margin: 0; }
.gl-head h2 svg { width: 1.25rem; height: 1.25rem; color: var(--gl-brand); flex: none; }
.gl-badge { font-size: 11px; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: #fef2f2; color: #b91c1c; }
.gl-badge.is-optional { background: #f1f5f9; color: var(--gl-muted); }
.gl-desc { font-size: 12.5px; line-height: 1.9; color: var(--gl-muted); margin: 0 0 .75rem; }
.gl-tools { display: flex; gap: .5rem; margin-bottom: .6rem; align-items: stretch; }
.gl-search { position: relative; flex: 1; min-width: 0; }
.gl-search input { width: 100%; height: 42px; border: 1px solid var(--gl-line); border-radius: 12px; padding: 0 2.3rem 0 .75rem; font: inherit; font-size: 13px; background: #fff; color: var(--gl-ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.gl-search input:focus { border-color: var(--gl-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gl-brand) 15%, transparent); }
.gl-search > svg { position: absolute; inset-inline-start: .7rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--gl-muted); pointer-events: none; }
.gl-results { position: absolute; z-index: 1200; inset-inline: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--gl-line); border-radius: 12px; box-shadow: 0 12px 30px rgb(15 23 42 / .14); max-height: 280px; overflow: auto; }
.gl-result { display: block; width: 100%; text-align: start; padding: .6rem .8rem; border: 0; background: none; font: inherit; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.gl-result:hover, .gl-result:focus { background: #f8fafc; outline: none; }
.gl-result b { display: block; font-size: 13px; color: var(--gl-ink); }
.gl-result span { display: block; font-size: 11.5px; color: var(--gl-muted); line-height: 1.7; }
.gl-result-empty { padding: .8rem; font-size: 12px; color: var(--gl-muted); }
.gl-btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; height: 42px; padding: 0 .85rem; border-radius: 12px; border: 1px solid var(--gl-line); background: #fff; color: var(--gl-ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.gl-btn:hover { border-color: var(--gl-brand); color: var(--gl-brand); }
.gl-btn svg { width: 18px; height: 18px; flex: none; }
.gl-btn.is-loading svg { animation: gl-spin 1s linear infinite; }
.gl-btn-primary { background: var(--gl-brand); border-color: var(--gl-brand); color: #fff; }
.gl-btn-primary:hover { color: #fff; filter: brightness(1.06); }
.gl-stage { position: relative; height: 340px; border-radius: 16px; overflow: hidden; border: 1px solid var(--gl-line); background: #eef2f7; isolation: isolate; }
.gl-map { position: absolute; inset: 0; direction: ltr; z-index: 0; }
.gl-map .leaflet-control-attribution { font-size: 9px; direction: ltr; }
.gl-pin { position: absolute; z-index: 500; left: 50%; top: 50%; width: 40px; height: 54px; margin: -54px 0 0 -20px; pointer-events: none; transition: transform .18s ease; filter: drop-shadow(0 6px 6px rgb(0 0 0 / .25)); }
.gl-pin.is-moving { transform: translateY(-12px); }
.gl-pin-shadow { position: absolute; z-index: 499; left: 50%; top: 50%; width: 14px; height: 5px; margin: -2px 0 0 -7px; border-radius: 50%; background: rgb(0 0 0 / .3); pointer-events: none; transition: transform .18s, opacity .18s; }
.gl-pin.is-moving + .gl-pin-shadow { transform: scale(1.6); opacity: .5; }
.gl-float { position: absolute; z-index: 600; display: flex; gap: .4rem; }
.gl-float.is-top { top: .6rem; right: .6rem; }
.gl-float.is-bottom { bottom: .75rem; inset-inline: .75rem; justify-content: center; }
.gl-float .gl-btn { height: 38px; box-shadow: 0 4px 14px rgb(15 23 42 / .15); }
.gl-icon-btn { width: 38px; padding: 0; }
.gl-lock { position: absolute; z-index: 650; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: .75rem; background: linear-gradient(to top, rgb(15 23 42 / .35), transparent 55%); }
.gl-lock[hidden] { display: none; }
.gl-locked .gl-float.is-bottom, .gl-locked .gl-float.is-top { display: none; }
.gl-full .gl-lock { padding-bottom: 1.25rem; }
.gl-loading .gl-stage::after { content: ''; position: absolute; z-index: 700; inset: 0; background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 50%, #eef2f7 100%); background-size: 200% 100%; animation: gl-shimmer 1.2s infinite; }
.gl-info { display: grid; gap: .25rem; margin-top: .6rem; font-size: 12.5px; line-height: 1.9; }
.gl-status { font-weight: 700; }
.gl-status:empty { display: none; }
.gl-status[data-kind="ok"] { color: #15803d; }
.gl-status[data-kind="ok"]::before { content: '✓ '; }
.gl-status[data-kind="pending"] { color: #b45309; }
.gl-status[data-kind="error"] { color: #b91c1c; }
.gl-address { color: var(--gl-ink); }
.gl-address:empty { display: none; }
.gl-address:not(:empty)::before { content: 'آدرس تقریبی روی نقشه: '; color: var(--gl-muted); }
.gl-coords { color: var(--gl-muted); font-size: 11px; direction: ltr; text-align: start; unicode-bidi: plaintext; }
.gl-error-msg { margin-top: .5rem; padding: .55rem .8rem; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 12.5px; font-weight: 700; }
.gl-error-msg[hidden] { display: none; }
.gl-fallback-note { display: none; font-size: 11px; color: var(--gl-muted); margin-top: .25rem; }
.gl-fallback .gl-fallback-note { display: block; }
.gl-shake { animation: gl-shake .45s; }
.gl-box.gl-has-value .gl-stage { border-color: #86efac; }
.gl-marker { background: none; border: 0; }
.gl-popup { font-family: inherit; direction: rtl; text-align: right; font-size: 12px; line-height: 1.9; min-width: 190px; }
.gl-popup b { font-size: 13px; }
.gl-popup-muted { color: #64748b; font-size: 11.5px; }
.gl-popup-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .3rem; }
.gl-popup-links a { color: #e11d48; font-weight: 700; text-decoration: none; }
.gl-map-error { display: grid; place-items: center; height: 100%; color: #64748b; font-size: 13px; }
.gl-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.gl-links a { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--gl-line); font-size: 12px; font-weight: 600; color: var(--gl-ink); text-decoration: none; background: #fff; }
.gl-links a:hover { border-color: var(--gl-brand); color: var(--gl-brand); }
.gl-msg { font-size: 12.5px; font-weight: 700; margin-top: .4rem; }
.gl-msg[data-kind="ok"] { color: #15803d; }
.gl-msg[data-kind="error"] { color: #b91c1c; }
.gl-msg[hidden] { display: none; }
/* تمام‌صفحه */
html.gl-noscroll, html.gl-noscroll body { overflow: hidden !important; }
.gl-box.gl-full { position: fixed; z-index: 9999; inset: 0; margin: 0 !important; border-radius: 0; background: #fff; padding: 12px; display: flex; flex-direction: column; overflow: auto; }
.gl-box.gl-full .gl-stage { flex: 1; height: auto; min-height: 300px; }
.gl-box.gl-full .gl-desc { display: none; }
@media (max-width: 640px) {
    .gl-stage { height: 290px; border-radius: 14px; }
    .gl-tools { flex-wrap: wrap; }
    .gl-search { flex-basis: 100%; }
    .gl-tools .gl-btn { flex: 1; }
}
@keyframes gl-spin { to { transform: rotate(360deg); } }
@keyframes gl-shimmer { to { background-position: -200% 0; } }
@keyframes gl-shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
/* هماهنگی با قالب ژوپین */
.gl-box { --gl-brand: var(--brand, #0B7A66); --gl-line: var(--line, #e5e7eb); --gl-muted: var(--muted, #64748b); --gl-ink: var(--ink, #0f172a); }
.gl-search input, .gl-btn:not(.gl-btn-primary), .gl-results, .gl-links a { background: var(--surface-strong, #fff); color: var(--ink); }
.gl-result { border-color: var(--line); }
.gl-result:hover, .gl-result:focus { background: var(--field); }
.gl-box.gl-full { background: var(--page, #fff); }
.gl-stage { border-radius: var(--radius, 16px); }
.gl-view { height: 260px; border-radius: var(--radius, 16px); overflow: hidden; position: relative; background: var(--field); isolation: isolate; }
.gl-view .gl-map { position: absolute; inset: 0; direction: ltr; }
