/*
 * Locations module — auto-prompt picker (modal + page interstitial) and
 * on-demand drawer styles. Loaded sitewide via FrontModel when the LOCATIONS
 * module is enabled. Card sub-components (.loc-picker-card, .loc-drawer-card)
 * are visually consistent so visitors get a coherent look across both
 * surfaces.
 */

/* ---- Modal / page interstitial -------------------------------------- */
.loc-picker-modal { position: fixed; inset: 0; z-index: 99998; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.loc-picker-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px); }
.loc-picker-modal__inner { position: relative; background: #fff; color: #0f172a; max-width: 720px; width: 100%; max-height: 90vh; overflow: auto; border-radius: 14px; box-shadow: 0 24px 64px -16px rgba(15,23,42,.45); padding: 1.4rem 1.5rem 1.25rem; }
.loc-picker-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .25rem; }
.loc-picker-modal__title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.loc-picker-modal__close { background: transparent; border: 0; font-size: 1.6rem; line-height: 1; color: #64748b; cursor: pointer; padding: 0 .25rem; }
.loc-picker-modal__close:hover { color: #0f172a; }
.loc-picker-modal__sub { color: #64748b; font-size: .9rem; margin: 0 0 1rem; }
.loc-picker-modal__count { display: inline-block; margin-left: .35rem; padding: .1rem .5rem; background: #f1f5f9; color: #475569; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.loc-picker-modal__body { margin-bottom: .75rem; }
.loc-picker-modal__foot { display: flex; justify-content: flex-end; padding-top: .5rem; border-top: 1px solid #f1f5f9; }
.loc-picker-modal__skip { background: transparent; border: 0; color: #64748b; font-size: .9rem; cursor: pointer; padding: .35rem .5rem; }
.loc-picker-modal__skip:hover { color: #0f172a; text-decoration: underline; }
.loc-picker-modal__error { margin-top: .65rem; padding: .55rem .75rem; border-radius: 6px; background: #fef2f2; color: #b91c1c; font-size: .85rem; border: 1px solid #fecaca; }

/* Page mode — full-bleed interstitial. The picker IS the page until the
   visitor selects; no centred card, no rounded corners, no shadow. The
   solid backdrop hides the page content rendered behind. */
.loc-picker-modal--page { padding: 0; }
.loc-picker-modal--page .loc-picker-modal__backdrop { background: #fff; backdrop-filter: none; }
.loc-picker-modal--page .loc-picker-modal__inner { max-width: min(960px, 92vw); max-height: none; height: auto; border-radius: 0; box-shadow: none; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem); }
.loc-picker-modal--page .loc-picker-modal__title { font-size: clamp(1.5rem, 3vw, 2rem); }
.loc-picker-modal--page .loc-picker-modal__sub { font-size: 1rem; margin-bottom: 1.5rem; }

/* Picker layouts (flat-grid + step-flow) */
.loc-picker-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.loc-picker-steps__panel { padding: .25rem 0; }
.loc-picker-steps__title { font-size: .9rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #64748b; margin: 0 0 .75rem; }
.loc-picker-steps__cards { display: grid; gap: .65rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.loc-picker-steps__back { background: transparent; border: 0; color: #475569; font-size: .85rem; font-weight: 500; cursor: pointer; margin-bottom: .65rem; padding: 0; }
.loc-picker-steps__back:hover { color: #0f172a; }

/* Picker card (modal + page) */
.loc-picker-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; padding: .9rem 1rem; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.loc-picker-card:hover { border-color: #cbd5e1; box-shadow: 0 6px 18px -10px rgba(15,23,42,.18); transform: translateY(-1px); }
.loc-picker-card.is-maint { background: #fffbeb; border-color: #fde68a; }
.loc-picker-card.is-maint:hover { background: #fef3c7; }
.loc-picker-card__name  { font-weight: 600; font-size: 1rem; color: #0f172a; }
.loc-picker-card__where { font-size: .85rem; color: #64748b; }
.loc-picker-card__addr  { font-size: .8rem; color: #64748b; }
.loc-picker-card__phone { font-size: .8rem; color: #64748b; }
.loc-picker-card__count { font-size: .8rem; color: #64748b; }
.loc-picker-card__pill  { position: absolute; top: .5rem; right: .65rem; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .15rem .55rem; border-radius: 999px; background: #fde68a; color: #92400e; }
.loc-picker-card[disabled], .loc-picker-card.is-busy { opacity: .55; cursor: progress; }

@media (max-width: 480px) {
    .loc-picker-modal__inner { padding: 1.1rem 1rem 1rem; }
    .loc-picker-modal__title { font-size: 1.1rem; }
}

/* ---- On-demand drawer ------------------------------------------------ */
.loc-drawer { width: 380px; max-width: 92vw; }
.loc-drawer__sub  { color: #64748b; font-size: .85rem; margin: 0 0 .85rem; }
.loc-drawer__list { display: flex; flex-direction: column; gap: .5rem; }
.loc-drawer__error { margin-top: .65rem; padding: .55rem .75rem; border-radius: 6px; background: #fef2f2; color: #b91c1c; font-size: .85rem; border: 1px solid #fecaca; }

.loc-drawer-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; padding: .85rem 1rem; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; width: 100%; }
.loc-drawer-card:hover { border-color: #cbd5e1; box-shadow: 0 4px 14px -8px rgba(15,23,42,.18); transform: translateY(-1px); }
.loc-drawer-card.is-maint { background: #fffbeb; border-color: #fde68a; }
.loc-drawer-card.is-maint:hover { background: #fef3c7; }
.loc-drawer-card__name  { font-weight: 600; font-size: .95rem; color: #0f172a; }
.loc-drawer-card__where { font-size: .8rem; color: #64748b; }
.loc-drawer-card__addr  { font-size: .8rem; color: #64748b; }
.loc-drawer-card__phone { font-size: .8rem; color: #64748b; }
.loc-drawer-card__pill  { position: absolute; top: .55rem; right: .65rem; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .15rem .55rem; border-radius: 999px; background: #fde68a; color: #92400e; }
.loc-drawer-card[disabled], .loc-drawer-card.is-busy { opacity: .55; cursor: progress; }
