/* Shop My Stay — shared app states (alerts, loading, sheets, preview banner)
   Uses the color, type, and radius tokens already defined in each page's :root. */

.sms-demo-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  background: var(--accent-lt); color: var(--accent);
  font-family: var(--font-body); font-size: 0.76rem; font-weight: 400; line-height: 1.45;
  text-align: center; padding: 8px 16px;
  border-bottom: 1px solid rgba(44,74,62,0.15);
}
.sms-demo-banner strong { font-weight: 600; }
/* Make room for the banner and move fixed/sticky headers below it */
html.sms-demo body { padding-top: var(--demo-h, 0px); }
html.sms-demo body > header, html.sms-demo .nav, html.sms-demo .bar { top: var(--demo-h, 0px) !important; }
html.sms-demo .progress-wrap { top: calc(64px + var(--demo-h, 0px)) !important; }

.sms-alert {
  display: none;
  font-family: var(--font-body); font-size: 0.84rem; line-height: 1.5;
  padding: 11px 14px; border-radius: var(--radius-sm);
  margin: 0 0 16px;
}
.sms-alert.show { display: block; }
.sms-alert.error { background: #FBEDEB; color: var(--error, #C0392B); }
.sms-alert.success { background: var(--accent-lt); color: var(--accent); }
.sms-alert.info { background: var(--sand); color: var(--mist); }

.sms-spinner {
  display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: sms-spin 0.7s linear infinite;
}
@keyframes sms-spin { to { transform: rotate(360deg); } }
button.is-busy { cursor: progress; opacity: 0.85; }
button:disabled { cursor: not-allowed; }

.field-error { font-size: 0.74rem; color: var(--error, #C0392B); margin-top: 6px; display: none; }
.field.invalid .field-error { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error, #C0392B); }

.check-row {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.8rem; color: var(--mist); font-weight: 300; line-height: 1.5; margin: 4px 0 18px;
}
.check-row input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.check-row a { color: var(--accent); font-weight: 500; }

.link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 500; color: var(--accent);
}
.link-btn:hover { text-decoration: underline; }

.private-tag {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--linen); color: var(--mist);
  font-size: 0.64rem; font-weight: 500; letter-spacing: 0.04em; text-transform: none;
}

/* Bottom sheet / side panel (same pattern as the sticker-mapping sheet) */
.sms-backdrop { position: fixed; inset: 0; background: rgba(28,25,23,0.4); z-index: 400; display: none; }
.sms-backdrop.open { display: block; }
.sms-sheet {
  position: fixed; left: 0; right: 0; bottom: -100%;
  max-height: 88vh; overflow-y: auto;
  background: var(--white); border-radius: 24px 24px 0 0;
  z-index: 401; padding: 10px 22px 30px;
  transition: bottom 0.3s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0.3s;
  visibility: hidden;
  font-family: var(--font-body);
}
.sms-sheet.open { bottom: 0; visibility: visible; transition: bottom 0.3s cubic-bezier(0.4,0,0.2,1), visibility 0s; }
.sms-sheet .sheet-handle { width: 40px; height: 4px; background: var(--linen); border-radius: 2px; margin: 6px auto 16px; }
.sms-sheet h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; margin-bottom: 4px; }
.sms-sheet .sheet-sub { font-size: 0.8rem; color: var(--mist); font-weight: 300; margin-bottom: 18px; }
.sms-sheet .field { margin-bottom: 14px; }
.sms-sheet .field label {
  display: block; font-size: 0.72rem; font-weight: 500; color: var(--mist);
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 6px;
}
.sms-sheet .field input, .sms-sheet .field textarea, .sms-sheet .field select {
  width: 100%; padding: 12px 14px; background: var(--sand);
  border: 1.5px solid transparent; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.9rem; color: var(--ink); outline: none;
}
.sms-sheet .field textarea { min-height: 76px; resize: vertical; }
.sms-sheet .field input:focus, .sms-sheet .field textarea:focus { border-color: var(--ink); background: var(--white); }
.sms-sheet .field-hint { font-size: 0.74rem; color: var(--mist); font-weight: 300; margin-top: 6px; }
.sms-sheet .field-hint a { color: var(--accent); font-weight: 500; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .sheet-btn {
  flex: 1; padding: 13px 18px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 500;
  background: var(--ink); color: #fff; transition: background 0.2s;
}
.sheet-actions .sheet-btn:hover { background: var(--accent); }
.sheet-actions .sheet-btn.ghost { flex: 0 0 auto; background: transparent; color: var(--mist); border: 1.5px solid var(--stone); }
.sheet-actions .sheet-btn.danger { flex: 0 0 auto; background: transparent; color: var(--error, #C0392B); border: 1.5px solid #E8C5C0; }

.video-suggest { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.video-opt {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--linen);
  background: var(--white); cursor: pointer; font-family: var(--font-body); font-size: 0.84rem; color: var(--ink);
}
.video-opt:hover { border-color: var(--stone); }
.video-opt.selected { border-color: var(--accent); background: var(--accent-lt); }
.video-opt .vo-play {
  width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--sand);
  display: flex; align-items: center; justify-content: center; font-size: 0.6rem; flex-shrink: 0;
}
.video-opt .vo-src { display: block; font-size: 0.7rem; color: var(--mist); font-weight: 300; }

@media (min-width: 720px) {
  .sms-sheet { left: auto; right: -100%; top: 0; bottom: 0; width: 440px; max-height: none; border-radius: 0; padding: 26px 28px 30px; transition: right 0.3s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0.3s; }
  .sms-sheet.open { right: 0; bottom: 0; transition: right 0.3s cubic-bezier(0.4,0,0.2,1), visibility 0s; }
  .sms-sheet .sheet-handle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sms-sheet { transition: none; }
  .sms-spinner { animation-duration: 2s; }
}
