/* Delivery PIN selector + "We're Coming Soon!" popup (includes/service-area-modal.php) */
.sa-dialog {
    --sa-text: var(--ok-text-primary, #0f172a);
    --sa-muted: #475569;
    --sa-border: #cbd5e1;
    --sa-accent: var(--ok-green-primary, #16a34a);
    --sa-accent-ink: #ffffff;
    --sa-danger: #b91c1c;
    --sa-surface: #ffffff;
    border: none; border-radius: 18px; padding: 0; width: min(440px, calc(100vw - 32px));
    max-height: calc(100vh - 32px); overflow: auto; color: var(--sa-text); background: var(--sa-surface);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .3); font-family: inherit;
}
.sa-dialog:not([open]) { display: none; }
.sa-dialog[open]:not(:modal) { position: fixed; inset: 0; margin: auto; z-index: 100000; height: fit-content; }
.sa-dialog::backdrop { background: rgba(15, 23, 42, .55); }
.sa-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.sa-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sa-dialog h2 { font-size: 1.2rem; font-weight: 800; margin: 0; line-height: 1.3; color: var(--sa-text); }
.sa-sub { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--sa-muted); }
.sa-label { font-weight: 700; font-size: .86rem; margin-top: 4px; }
.sa-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sa-row input { flex: 1 1 160px; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid #94a3b8; border-radius: 10px;
    font: inherit; font-size: 1.05rem; letter-spacing: 1px; color: var(--sa-text); background: #fff; }
.sa-row input::placeholder { color: #64748b; letter-spacing: 0; }
.sa-row input:focus-visible, .sa-btn:focus-visible, .sa-x:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.sa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px;
    border-radius: 10px; border: 1px solid var(--sa-accent); background: var(--sa-accent); color: var(--sa-accent-ink);
    font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; }
.sa-btn[disabled] { opacity: .65; cursor: progress; }
.sa-btn-ghost { background: transparent; color: var(--sa-text); border-color: var(--sa-border); }
.sa-gps { width: 100%; }
.sa-x { border: none; background: transparent; font-size: 1.6rem; line-height: 1; width: 40px; height: 40px; border-radius: 8px; cursor: pointer; color: var(--sa-muted); }
.sa-status { margin: 0; min-height: 1.2em; font-size: .88rem; color: var(--sa-muted); }
.sa-status.is-error { color: var(--sa-danger); font-weight: 700; }
.sa-status.is-ok { color: #166534; font-weight: 700; }
.sa-confirm { border: 1px solid var(--sa-border); border-radius: 12px; padding: 12px; background: #f8fafc; }
.sa-confirm p { margin: 0 0 10px; font-size: .9rem; line-height: 1.45; }
.sa-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sa-actions-center { justify-content: center; }
.sa-center { align-items: center; text-align: center; }
.sa-popup p { margin: 0 0 8px; font-size: 1rem; line-height: 1.5; color: var(--sa-muted); }
.sa-badge { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: #fef3c7; color: #b45309; }
@media (max-width: 420px) {
    .sa-actions .sa-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: no-preference) {
    .sa-dialog[open] { animation: saIn .18s ease-out; }
    @keyframes saIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* Location search (combobox), manual entry, header chip */
.sa-current { margin: 0; font-size: .86rem; color: var(--sa-muted); }
.sa-combo { position: relative; }
.sa-row input { letter-spacing: 0; font-size: 1rem; }
.sa-suggest { list-style: none; margin: 6px 0 0; padding: 4px; border: 1px solid var(--sa-border); border-radius: 12px; background: #fff;
    max-height: 260px; overflow-y: auto; box-shadow: 0 10px 24px rgba(15, 23, 42, .12); }
.sa-suggest[hidden] { display: none; }
.sa-opt { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.sa-opt strong { font-size: .95rem; color: var(--sa-text); }
.sa-opt span { font-size: .8rem; color: var(--sa-muted); }
.sa-opt:hover, .sa-opt[aria-selected="true"] { background: #ecfdf3; }
.sa-manual { border: 1px solid var(--sa-border); border-radius: 12px; padding: 10px 12px; }
.sa-manual summary { cursor: pointer; font-weight: 700; font-size: .9rem; min-height: 28px; }
.sa-manual-grid { display: grid; gap: 4px; margin-top: 8px; }
.sa-manual-grid input, .sa-manual-grid select { min-height: 42px; padding: 8px 10px; border: 1px solid #94a3b8; border-radius: 10px; font: inherit; background: #fff; color: var(--sa-text); }
.sa-manual-grid .sa-btn { margin-top: 8px; }
.ok-delivery-chip strong, .ok-delivery-chip span { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ok-mobile-controls [data-pin-open] span { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
/* Product page / listing availability notes */
.sa-avail { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; padding: 12px 14px; margin: 10px 0; border-radius: 12px;
    border: 1px solid #fde68a; border-left: 4px solid #f59e0b; background: #fffbeb; color: #78350f; font-size: .92rem; line-height: 1.45; }
.sa-avail.is-ok { border-color: #bbf7d0; border-left-color: #16a34a; background: #f0fdf4; color: #14532d; }
.sa-avail p { margin: 0; flex: 1 1 220px; }
.sa-avail .sa-btn { min-height: 38px; padding: 6px 14px; font-size: .88rem; }
.sa-unavail-tag { display: inline-block; margin-top: 4px; font-size: .74rem; font-weight: 700; color: #92400e; background: #fef3c7; border-radius: 6px; padding: 2px 6px; }

/* Seller service-area picker */
.sa-pick { display: grid; gap: 10px; }
.sa-pick .sa-combo input, .sa-pick select, .sa-pick input[type=text] { min-height: 42px; }
.sa-pick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sa-chip { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px 6px 12px; border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 999px; font-size: .88rem; }
.sa-chip select { min-height: 30px; font-size: .8rem; border-radius: 8px; border: 1px solid #cbd5e1; padding: 2px 6px; }
.sa-chip-x { border: 0; background: transparent; font-size: 1.2rem; line-height: 1; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; color: #475569; }
.sa-chip-x:hover { background: #dcfce7; }
.sa-chip-empty { color: #64748b; font-size: .88rem; }
.sa-pick-status { margin: 0; font-size: .86rem; color: #475569; min-height: 1.2em; }
.sa-pick-status.is-error { color: #b91c1c; font-weight: 700; }
.sa-manual-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; align-items: end; }
.sa-manual-row label { display: grid; gap: 4px; font-size: .82rem; font-weight: 600; }

/* The dialog's colour variables, also for buttons used outside it (product page note, seller picker). */
.sa-avail, .sa-pick {
    --sa-text: var(--ok-text-primary, #0f172a);
    --sa-muted: #475569;
    --sa-border: #cbd5e1;
    --sa-accent: var(--ok-green-primary, #16a34a);
    --sa-accent-ink: #ffffff;
}
.sa-avail .sa-btn-ghost { background: #fff; }
