/* ThaiSkyBlue installable app: components shared by the public site and the admin (install sheet,
   update notice, notifications panel, offline page). Brand moments (sheet, toast) are always midnight
   and gold; the panel takes its colours from the page around it. */

.pwa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border: 1px solid currentColor; border-radius: 10px;
  background: transparent; color: inherit; font: inherit; font-size: .9375rem; font-weight: 500; line-height: 1.2;
  cursor: pointer; text-decoration: none;
}
.pwa-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.pwa-btn--gold { background: #D9BC8B; border-color: #D9BC8B; color: #091722; }
.pwa-btn--gold:hover { background: #e6cfa6; border-color: #e6cfa6; }
.pwa-btn[disabled] { opacity: .55; pointer-events: none; }
.pwa-link { border: 0; background: none; padding: 6px 0; color: inherit; font: inherit; font-size: .875rem; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

/* ---------- Install suggestion: a bottom sheet above the tab bar ---------- */
.pwa-sheet {
  position: fixed; z-index: 90; left: 10px; right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom) + var(--pwa-tabbar, 0px));
  padding: 18px 18px 16px; border-radius: 20px; border: 1px solid rgba(217, 188, 139, .32);
  background: #102333; color: #F7F3EB; box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  font-family: "Jost", system-ui, sans-serif; line-height: 1.5;
  transform: translateY(24px); opacity: 0; transition: transform .3s cubic-bezier(.2, .6, .2, 1), opacity .3s;
}
.pwa-sheet.is-open { transform: none; opacity: 1; }
@media (min-width: 640px) { .pwa-sheet { left: auto; right: 24px; bottom: 24px; width: 400px; } }
.pwa-sheet__close { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; color: inherit; cursor: pointer; opacity: .7; }
.pwa-sheet__close svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }
.pwa-sheet__head { display: flex; align-items: center; gap: 14px; padding-right: 32px; margin-bottom: 10px; }
.pwa-sheet__icon { width: 56px; height: 56px; border-radius: 14px; flex: none; box-shadow: 0 0 0 1px rgba(217, 188, 139, .25); }
.pwa-sheet__title { margin: 0; font-size: 1.1rem; font-weight: 500; line-height: 1.3; }
.pwa-sheet__text { margin: 0 0 14px; color: rgba(247, 243, 235, .8); font-size: .9375rem; }
.pwa-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.pwa-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: center; font-size: .9375rem; color: rgba(247, 243, 235, .88); }
.pwa-steps svg { width: 24px; height: 24px; stroke: #D9BC8B; fill: none; stroke-width: 1.6; }
.pwa-sheet__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pwa-sheet__actions .pwa-btn { flex: 1 1 140px; }

/* ---------- "A new version is ready" ---------- */
.pwa-toast {
  position: fixed; z-index: 95; left: 10px; right: 10px; top: calc(10px + env(safe-area-inset-top));
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px 12px 18px;
  border-radius: 14px; background: #102333; color: #F7F3EB; border: 1px solid rgba(217, 188, 139, .32);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35); font-family: "Jost", system-ui, sans-serif; font-size: .9375rem;
}
.pwa-toast span { flex: 1 1 180px; }
@media (min-width: 640px) { .pwa-toast { left: auto; right: 24px; width: 420px; } }

/* ---------- Notifications on this device ---------- */
.pwa-push { margin: 28px 0; padding: 20px; border: 1px solid var(--line, var(--a-border, rgba(127, 127, 127, .3))); border-radius: 16px; }
.pwa-push__title { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 1.2rem; font-weight: 500; font-family: inherit; }
.pwa-push__title svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }
.pwa-push__intro { margin: 0 0 10px; opacity: .8; }
.pwa-push__status { margin: 0 0 14px; font-weight: 500; }
.pwa-push[data-state="on"] .pwa-push__status { color: #6fae8d; }
.pwa-push[data-state="denied"] .pwa-push__status, .pwa-push[data-state="ios"] .pwa-push__status { font-weight: 400; }
.pwa-push__check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; margin: 0 0 14px; cursor: pointer; }
.pwa-push__check input { width: 20px; height: 20px; margin: 2px 0 0; }
.pwa-push__check small { display: block; opacity: .7; font-size: .8125rem; margin-top: 2px; }
.pwa-push__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pwa-push__devices { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line, var(--a-border, rgba(127, 127, 127, .3))); }
.pwa-push__label { margin: 0 0 6px; font-size: .8125rem; opacity: .7; }
.pwa-push__devices ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pwa-push__devices li { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .9375rem; }

/* ---------- Offline page ---------- */
.offline-page { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; background: #091722; color: #F7F3EB; }
.offline { display: grid; justify-items: center; gap: 14px; max-width: 420px; padding: calc(32px + env(safe-area-inset-top)) 24px calc(32px + env(safe-area-inset-bottom)); text-align: center; }
.offline__icon { width: 72px; height: 72px; border-radius: 18px; }
.offline__title { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2.2rem; font-weight: 300; margin: 8px 0 0; }
.offline__body { margin: 0 0 10px; color: rgba(247, 243, 235, .78); }
.offline .btn-bio { max-width: 280px; }
