/* Concierge widget (ai_assistant/concierge_widget.html, static/js/concierge-widget.js).
 * Desktops: floating panel at the bottom right. Phones (up to 768 px): full-screen sheet whose
 * top and height follow the visible viewport (--concierge-top / --concierge-height, set by the
 * script), with 44 px touch targets and a 16 px input so the browser does not zoom the page. */

.concierge-widget { position: fixed; right: 24px; bottom: 24px; z-index: 50; }

.concierge-launcher { position: relative; display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: transparent; transition: transform .2s ease, opacity .2s ease; }
.concierge-launcher:hover { transform: scale(1.05); }
.concierge-launcher:active { transform: scale(.95); }
.concierge-launcher:focus-visible { outline: 2px solid #065f46; outline-offset: 2px; }
.concierge-launcher img { width: 64px; height: 64px; object-fit: contain; }
.concierge-launcher-badge { position: absolute; top: 6px; right: 6px; width: 12px; height: 12px; border-radius: 50%; background: #358064; box-shadow: 0 0 0 2px #fff; }

.concierge-greeting { position: absolute; bottom: 9px; right: 73px; display: flex; align-items: center; gap: 2px; white-space: nowrap; background: #fffef7; border: 1px solid #d7e3d3; border-radius: 100px; padding: 4px 5px 4px 14px; box-shadow: 0 5px 24px #103f3619; color: #145447; transition: transform .2s ease, opacity .2s ease; }
.concierge-greeting-action { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 650; min-height: 36px; }
.concierge-greeting-dot { width: 6px; height: 6px; border-radius: 50%; background: #358064; box-shadow: 0 0 0 4px #35806412; }
.concierge-greeting-close { width: 34px; min-height: 36px; color: #697b6d; font-size: 18px; }

.concierge-panel { display: flex; flex-direction: column; width: 410px; max-width: calc(100vw - 48px); height: min(720px, calc(100vh - 48px)); height: min(720px, calc(100dvh - 48px)); background: #fff; border: 1px solid rgb(2 44 34 / .15); border-radius: 16px; box-shadow: 0 25px 50px -12px rgb(0 0 0 / .25); overflow: hidden; }
.concierge-header { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 6px 8px 14px; background: #fffcf5; border-bottom: 1px solid rgb(2 44 34 / .1); }
.concierge-header-image { flex: none; width: 40px; height: 40px; object-fit: contain; }
.concierge-header-text { flex: 1; min-width: 0; }
.concierge-header-actions { flex: none; display: flex; gap: 2px; }
.concierge-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; color: rgb(6 78 59 / .65); transition: background .15s, color .15s; }
.concierge-icon-button:hover { background: rgb(6 78 59 / .1); color: #022c22; }
.concierge-icon-button:focus-visible { outline: 2px solid #065f46; outline-offset: -2px; }
.concierge-icon-button svg { width: 22px; height: 22px; }
.concierge-body { flex: 1; min-height: 0; overscroll-behavior: contain; }
.concierge-form { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid #e5e5e5; }
.concierge-input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; font-size: 16px; color: #171717; background: #fff; border: 1px solid #d4d4d4; border-radius: 12px; }
.concierge-input:focus { outline: none; border-color: #171717; box-shadow: 0 0 0 1px #171717; }
.concierge-input:disabled { background: #f5f5f5; }
.concierge-send { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: #171717; color: #fff; transition: background .15s, opacity .15s; }
.concierge-send:hover { background: #262626; }
.concierge-send:disabled { opacity: .4; cursor: not-allowed; }
.concierge-send svg { width: 18px; height: 18px; }

html.concierge-sheet-open, html.concierge-sheet-open body { overflow: hidden; }

@media (max-width: 768px) {
  .concierge-widget { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .concierge-launcher, .concierge-launcher img { width: 56px; height: 56px; }
  .concierge-greeting { right: 64px; bottom: 8px; padding-left: 12px; }
  .concierge-greeting-action { font-size: 11px; gap: 7px; }
  .concierge-launcher-away .concierge-launcher, .concierge-launcher-away .concierge-greeting { opacity: 0; transform: translateY(24px); pointer-events: none; }
  .concierge-panel { position: fixed; left: 0; right: 0; top: var(--concierge-top, 0); bottom: 0; width: 100%; max-width: none; height: var(--concierge-height, auto); border: 0; border-radius: 0; box-shadow: none; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .concierge-header { padding-left: 12px; }
  .concierge-form { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .concierge-launcher, .concierge-greeting { transition: none; }
}
