/* Localsewa v32.9.9 — Customer UI migration to shadcn-compatible interaction contracts. */

/* Customer Sheet */
.ls-customer-sidebar[role="dialog"] {
  border-left: 1px solid var(--border, #e5ede8);
  outline: none;
}
.ls-customer-sidebar[data-state="open"] { visibility: visible; }
.ls-customer-sidebar[data-state="closed"] { visibility: hidden; }
.ls-customer-sidebar :is(a,button,input):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ring, #16a34a) 72%, white);
  outline-offset: 2px;
}

/* Notifications: Sheet on mobile/tablet, Popover on desktop. */
[role="dialog"][aria-label="Notifications"] .ls-customer-notification-surface {
  overscroll-behavior: contain;
}
@media (max-width: 767.98px) {
  [role="dialog"][aria-label="Notifications"] > button[aria-label="Close notifications"] {
    background: rgb(15 23 42 / .32) !important;
    backdrop-filter: blur(2px);
  }
  [role="dialog"][aria-label="Notifications"] .ls-customer-notification-surface {
    inset: auto 10px max(10px, env(safe-area-inset-bottom)) 10px !important;
    width: auto !important;
    max-height: min(78dvh, 680px) !important;
    border-radius: 26px !important;
    box-shadow: 0 28px 90px rgb(15 23 42 / .30) !important;
  }
}
@media (min-width: 768px) {
  [role="dialog"][aria-label="Notifications"] > button[aria-label="Close notifications"] {
    background: transparent !important;
    backdrop-filter: none !important;
  }
  [role="dialog"][aria-label="Notifications"] .ls-customer-notification-surface {
    left: auto !important;
    right: 20px !important;
    top: 76px !important;
    width: min(410px, calc(100vw - 32px)) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgb(15 23 42 / .20) !important;
  }
}

/* Saved-provider AlertDialog */
.ls-shadcn-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(15 23 42 / .38);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity var(--motion-overlay, 180ms) ease-out;
}
.ls-shadcn-alert-overlay.is-open { opacity: 1; }
.ls-shadcn-alert-content {
  width: min(100%, 400px);
  border: 1px solid var(--border, #dfe8e2);
  border-radius: 22px;
  background: var(--background, #fff);
  padding: 22px;
  box-shadow: 0 28px 90px rgb(15 23 42 / .24);
  color: var(--foreground, #10231a);
}
.ls-shadcn-alert-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: #fef2f2;
  color: #dc2626;
  font-weight: 700;
  font-size: 18px;
}
.ls-shadcn-alert-content h2 { margin: 16px 0 0; font-size: 18px; line-height: 1.25; font-weight: 650; letter-spacing: -.02em; }
.ls-shadcn-alert-content p { margin: 7px 0 0; color: var(--muted-foreground, #64748b); font-size: 14px; line-height: 1.55; }
.ls-shadcn-alert-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.ls-shadcn-alert-actions button { min-height: 42px; border-radius: 12px; font-size: 13px; font-weight: 600; transition: background-color 140ms ease, border-color 140ms ease; }
.ls-shadcn-alert-cancel { border: 1px solid var(--border, #dde9e1); background: #fff; color: #475569; }
.ls-shadcn-alert-cancel:hover { background: #f8faf9; }
.ls-shadcn-alert-confirm { border: 1px solid #dc2626; background: #dc2626; color: #fff; }
.ls-shadcn-alert-confirm:hover { background: #b91c1c; }

/* Profile edit: Drawer on mobile/tablet, Dialog on desktop. */
.ls-profile-edit-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  border: 0;
  background: rgb(15 23 42 / .34);
  backdrop-filter: blur(2px);
}
body.ls-profile-edit-open .ls-profile-info-card--editing {
  position: fixed !important;
  z-index: 10001 !important;
  left: 10px !important;
  right: 10px !important;
  bottom: max(10px, env(safe-area-inset-bottom)) !important;
  max-height: min(84dvh, 720px) !important;
  overflow-y: auto !important;
  border-radius: 24px !important;
  box-shadow: 0 28px 90px rgb(15 23 42 / .28) !important;
  background: #fff !important;
}
body.ls-profile-edit-open .ls-profile-info-card--editing::before {
  content: "Edit profile";
  display: block;
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 17px 18px 14px;
  border-bottom: 1px solid #eef3f0;
  background: rgb(255 255 255 / .96);
  backdrop-filter: blur(12px);
  color: #10231a;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -.02em;
}
body.ls-profile-edit-open .ls-profile-edit-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: rgb(250 252 251 / .96) !important;
  backdrop-filter: blur(12px);
}
@media (min-width: 1024px) {
  body.ls-profile-edit-open .ls-profile-info-card--editing {
    left: 50% !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    width: min(540px, calc(100vw - 40px)) !important;
    max-height: min(78dvh, 760px) !important;
    transform: translate(-50%, -50%) !important;
  }
}

/* Standardized Customer fields, tabs and alert-dialog surfaces. */
.auth-screen [data-ls-input="true"],
.ls-account-security-main [data-ls-input="true"] {
  font-family: var(--font-sans, Geist, ui-sans-serif, system-ui, sans-serif);
}
.auth-screen [data-ls-input="true"]:focus-visible,
.ls-account-security-main [data-ls-input="true"]:focus-visible {
  outline: none;
}
.ls-booking-filter-tab[role="tab"]:focus-visible {
  outline: 2px solid #86efac;
  outline-offset: 2px;
}
.ls-customer-alert-dialog > [data-keyboard-scroll] {
  border: 1px solid var(--border, #dde9e1);
}

@media (prefers-reduced-motion: reduce) {
  .ls-shadcn-alert-overlay,
  .ls-shadcn-alert-actions button { transition-duration: 1ms !important; }
}
