/* Auth/profile modals, support/promo dialogs, toasts, concierge widget, and FABs */

.modal-overlay { display: flex; align-items: flex-end; justify-content: center; background: rgba(16, 18, 20, 0.58); backdrop-filter: blur(4px); }
@media (min-width: 768px) { .modal-overlay { align-items: center; } }

.modal-content {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  background: var(--canvas);
  color: var(--ink);
  border-radius: 12px 12px 0 0;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--brand);
  padding: 28px 24px calc(28px + var(--safe-b));
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform 0.3s var(--ease);
}

@media (min-width: 768px) { .modal-content { border-radius: var(--r-md); padding: 36px 32px; } }
.modal-overlay.open .modal-content { transform: translateY(0); }

.modal-close-btn,
.auth-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.auth-input { width: 100%; padding: 12px 14px; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r-sm); font-size: 14px; color: var(--ink); }
.auth-input:focus { outline: none; border-color: var(--brand); }
.auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: var(--ink-soft); }
.auth-switch button { color: var(--brand); font-weight: 600; padding: 6px; text-decoration: underline; }

.profile-header-pad { padding: 20px 24px; border-bottom: 1px solid var(--rule); background: var(--surface); }
.profile-avatar {
  width: 48px; height: 48px; border-radius: var(--r-sm); background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--ff-display); font-size: 22px; font-weight: 500;
}
.profile-body-pad { padding: 18px 20px; }
.profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.profile-action-btn { display: flex; flex-direction: column; align-items: flex-start; padding: 14px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--surface); text-align: left; }
.logout-btn-premium {
  width: 100%; padding: 12px; border: 1px solid rgba(185, 56, 44, 0.35); background: rgba(185, 56, 44, 0.06); color: #B9382C;
  border-radius: var(--r-sm); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px;
}

.order-card-compact { background: var(--surface); border: 1px solid var(--rule); border-left: 2px solid var(--brand); border-radius: var(--r-sm); padding: 14px; margin-bottom: 10px; }
.status-pill { padding: 3px 8px; border-radius: var(--r-sm); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: var(--surface-alt); }
.status-pill[data-status="delivered"] { background: rgba(30, 122, 86, 0.12); color: #1E7A56; }
.status-pill[data-status="pending"] { background: rgba(184, 147, 66, 0.16); color: #8A6212; }
.status-pill[data-status="cancelled"] { background: rgba(185, 56, 44, 0.12); color: #B9382C; }

/* Support & Promo Modals */
.support-modal-overlay,
.promo-modal-overlay {
  position: fixed; inset: 0; z-index: 22000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(16, 18, 20, 0.65); backdrop-filter: blur(5px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur) ease, visibility 0s var(--dur);
}
.support-modal-overlay.open, .promo-modal-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.support-modal-panel, .promo-modal-panel { position: relative; width: 100%; max-width: 560px; max-height: 85vh; background: var(--canvas); border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--sh-xl); }
.support-modal-header { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; background: var(--nav-solid); color: #fff; }
.support-modal-header-left { display: flex; align-items: center; gap: 10px; }
.support-modal-accent-bar { width: 3px; height: 18px; background: var(--brand-gold); }
.support-modal-title { font-family: var(--ff-display); font-size: 22px; }
.support-close-btn, .promo-close-btn { width: 32px; height: 32px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.14); color: #fff; display: flex; align-items: center; justify-content: center; }
.promo-close-btn { position: absolute; top: 12px; right: 12px; z-index: 2; }
.support-modal-body { padding: 24px; overflow-y: auto; font-size: 14px; line-height: 1.75; color: var(--ink); }
.support-modal-body h3 { font-size: 18px; color: var(--brand); margin: 16px 0 6px; }
.promo-poster-img { width: 100%; height: auto; }

/* Toast */
.toast-container { position: fixed; top: calc(var(--top-offset) + 10px); left: 16px; right: 16px; z-index: 35000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
@media (min-width: 768px) { .toast-container { left: auto; right: 24px; max-width: 360px; } }
.toast { padding: 13px 16px; border-radius: var(--r-sm); color: #fff; font-size: 12.5px; font-weight: 500; box-shadow: var(--sh-lg); transform: translateY(-12px); opacity: 0; transition: all 0.3s var(--ease); }
.toast.show { transform: translateY(0); opacity: 1; }
.toast--inner { display: flex; align-items: center; gap: 8px; }
.toast-success { background: #173D2E; border-left: 3px solid #59B48C; }
.toast-error { background: #4D1916; border-left: 3px solid #E57368; }
.toast-info { background: var(--nav-solid); border-left: 3px solid var(--brand-gold); }

/* Quiet-luxury consultation panel */
#enq-panel {
  position: fixed; bottom: calc(var(--bottom-nav-h) + var(--safe-b) + 74px); right: 18px; width: 310px; max-width: calc(100vw - 36px);
  height: 430px; max-height: calc(100vh - 140px); z-index: 21000; background: var(--canvas); border: 1px solid var(--rule-strong);
  border-radius: var(--r-md); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--sh-xl);
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 0.25s ease, transform 0.25s var(--ease);
}
#enq-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
@media (min-width: 768px) { #enq-panel { bottom: 78px; right: 24px; } }
#enq-header { position: relative; padding: 14px 40px; background: var(--nav-solid); color: #fff; text-align: center; }
#enq-title { font-family: var(--ff-display); font-size: 18px; font-weight: 500; }
#enq-subtitle { font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.72; }
#enq-close { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #fff; padding: 4px; }
#enq-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-alt); }
.enq-msg { max-width: 84%; padding: 9px 12px; border-radius: var(--r-sm); font-size: 12.5px; line-height: 1.5; word-break: break-word; }
.enq-msg-bot { background: var(--surface); color: var(--ink); border: 1px solid var(--rule); align-self: flex-start; }
.enq-msg-user { background: var(--brand); color: #fff; align-self: flex-end; }
#enq-input-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--rule); background: var(--surface); }
#enq-input { flex: 1; border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 8px 12px; font-size: 12.5px; background: var(--canvas); outline: none; }
#enq-send { width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; }
.enq-msg-choices { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--rule); padding: 12px; border-radius: var(--r-sm); width: 92%; align-self: flex-start; }
.enq-choices-list { display: flex; flex-direction: column; gap: 6px; }
.enq-choice-label { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--surface-alt); border: 1px solid var(--rule); border-radius: var(--r-sm); font-size: 12px; cursor: pointer; }
.enq-choice-radio { -webkit-appearance: auto; appearance: auto; accent-color: var(--brand); }
.enq-choices-submit-btn { background: var(--brand); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; align-self: flex-start; }
.enq-send-wa-btn { background: #1E7A56; color: #fff; padding: 9px 14px; border-radius: var(--r-sm); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; margin-top: 6px; }

/* Restrained floating action buttons */
#wa-fab, #instagram-fab, #enq-bubble {
  position: fixed; right: 18px; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(16, 18, 20, 0.22);
  transition: transform 0.22s var(--ease), box-shadow 0.22s ease;
}
#enq-bubble { z-index: 900; bottom: calc(var(--bottom-nav-h) + var(--safe-b) + 18px); background: var(--nav-solid); color: #fff; border: 1px solid rgba(255, 255, 255, 0.24); }
#instagram-fab { z-index: 901; bottom: calc(var(--bottom-nav-h) + var(--safe-b) + 68px); background: var(--surface); color: var(--ink); border: 1px solid var(--rule-strong); }
#wa-fab { z-index: 902; bottom: calc(var(--bottom-nav-h) + var(--safe-b) + 118px); background: #1E7A56; color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
@media (min-width: 768px) {
  #wa-fab, #instagram-fab, #enq-bubble { right: 24px; }
  #enq-bubble { bottom: 24px; }
  #instagram-fab { bottom: 76px; }
  #wa-fab { bottom: 128px; }
}
#wa-fab:hover, #instagram-fab:hover, #enq-bubble:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 18, 20, 0.28); }
body.no-scroll #wa-fab, body.no-scroll #instagram-fab { display: none; }
