/* Ambassador AI Chat widget — brand navy/gold, self-contained. */
#cb-widget{display:none;}
.aichat-root{position:fixed;right:22px;bottom:22px;z-index:99999;font-family:"Segoe UI",Roboto,Arial,sans-serif}
.aichat-bubble{width:58px;height:58px;border-radius:50%;border:none;cursor:pointer;background:#0e2a47;color:#c9a24b;box-shadow:0 6px 20px rgba(14,42,71,.35);display:flex;align-items:center;justify-content:center;transition:transform .15s}
.aichat-bubble:hover{transform:scale(1.06)}
.aichat-bubble.aichat-hidden{display:none}

.aichat-panel{display:none;flex-direction:column;width:380px;max-width:calc(100vw - 24px);height:560px;max-height:calc(100vh - 40px);background:#fff;border-radius:14px;box-shadow:0 12px 40px rgba(14,42,71,.30);overflow:hidden}
.aichat-panel.aichat-open{display:flex}

.aichat-head{background:linear-gradient(135deg,#0e2a47,#16395e);color:#fff;padding:14px 16px;display:flex;align-items:center;justify-content:space-between}
.aichat-head-txt b{display:block;font-size:15px}
.aichat-head-txt span{font-size:11.5px;color:#c9a24b;letter-spacing:.06em}
.aichat-head-btns{display:flex;align-items:center;gap:2px}
.aichat-menubtn{background:none;border:none;color:#cfdcea;cursor:pointer;padding:4px;display:flex;align-items:center;border-radius:6px}
.aichat-menubtn:hover,.aichat-menubtn-on{color:#fff;background:rgba(255,255,255,.12)}
.aichat-close{background:none;border:none;color:#cfdcea;font-size:24px;line-height:1;cursor:pointer;padding:0 4px}
.aichat-close:hover{color:#fff}

/* Contact channels view */
.aichat-channels{display:none;flex:1;overflow-y:auto;background:#fff;padding:6px 0}
.aichat-panel.aichat-show-channels .aichat-channels{display:block}
.aichat-panel.aichat-show-channels .aichat-body,
.aichat-panel.aichat-show-channels .aichat-sugs,
.aichat-panel.aichat-show-channels .aichat-form,
.aichat-panel.aichat-show-channels .aichat-ch-bar,
.aichat-panel.aichat-show-channels .aichat-rate{display:none}

/* Always-visible channel icon bar */
.aichat-ch-bar{display:flex;gap:10px;justify-content:center;align-items:center;padding:8px 10px;background:#fff;border-top:1px solid #eef2f6;flex-wrap:wrap}
.aichat-ch-bar-top{border-top:none;border-bottom:1px solid #eef2f6}
.aichat-ch-bar-item{display:block;text-decoration:none;transition:transform .12s}
.aichat-ch-bar-item:hover{transform:scale(1.12)}
.aichat-ch-bar .aichat-ch-ic{width:36px;height:36px;border-radius:50%;flex:0 0 36px}
.aichat-ch-bar .aichat-ch-ic svg{width:21px;height:21px}
.aichat-ch-bar .aichat-ch-img img{width:36px;height:36px}
.aichat-ch-back{display:block;width:100%;text-align:left;background:none;border:none;color:#0d4b6e;font-size:13px;font-weight:600;padding:10px 18px;cursor:pointer}
.aichat-ch-back:hover{background:#f6f8fa}
.aichat-ch-item{display:flex;align-items:center;gap:14px;padding:13px 18px;text-decoration:none;border-bottom:1px solid #eef2f6;background:#fff}
.aichat-ch-item:hover{background:#f6f8fa}
.aichat-ch-ic{width:32px;height:32px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex:0 0 32px;overflow:hidden}
.aichat-ch-ic svg{width:20px;height:20px}
.aichat-ch-img{background:#fff}
.aichat-ch-img img{width:32px;height:32px;object-fit:contain;display:block}
.aichat-ch-label{flex:1;font-size:14px;font-weight:600;color:#0e2a47}
.aichat-ch-arrow{color:#9fb4c9;font-size:20px;line-height:1}

.aichat-body{flex:1;overflow-y:auto;padding:14px;background:#f6f8fa}
.aichat-msg{max-width:82%;padding:9px 13px;border-radius:12px;margin:6px 0;font-size:14px;line-height:1.5;word-wrap:break-word;white-space:pre-line}
.aichat-user{background:#0e2a47;color:#fff;margin-left:auto;border-bottom-right-radius:4px}
.aichat-ai{background:#fff;color:#22303e;border:1px solid #e3e9ef;border-bottom-left-radius:4px}
.aichat-ai a{color:#0d4b6e}
.aichat-note{font-size:12.5px;color:#5b6b7b;background:#eef2f6}
.aichat-typing span{display:inline-block;width:7px;height:7px;margin:0 2px;border-radius:50%;background:#9fb4c9;animation:aichat-b 1.2s infinite}
.aichat-typing span:nth-child(2){animation-delay:.2s}
.aichat-typing span:nth-child(3){animation-delay:.4s}
@keyframes aichat-b{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-5px);opacity:1}}

.aichat-actions{margin:4px 0 8px}
.aichat-book-btn{display:block;text-align:center;background:#c9a24b;color:#0e2a47;font-weight:700;font-size:14px;text-decoration:none;padding:11px 14px;border-radius:9px;margin:6px 0;box-shadow:0 3px 10px rgba(201,162,75,.35)}
.aichat-book-btn:hover{background:#d9b45e}

.aichat-sugs{padding:0 12px 6px;background:#f6f8fa;display:flex;flex-wrap:wrap;gap:6px}
.aichat-sug{border:1px solid #c9a24b;background:#fff;color:#7a5b1c;font-size:12.5px;border-radius:99px;padding:6px 12px;cursor:pointer}
.aichat-sug:hover{background:#f3e8cf}

.aichat-footer{border-top:1px solid #e3e9ef;background:#fff;padding:10px 12px 8px}
.aichat-form{display:flex;gap:8px}
.aichat-input{flex:1;border:1px solid #d7dfe7;border-radius:9px;padding:10px 12px;font-size:14px;outline:none}
.aichat-input:focus{border-color:#0e2a47}
.aichat-send{border:none;background:#0e2a47;color:#c9a24b;border-radius:9px;width:42px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.aichat-send:hover{background:#16395e}
.aichat-privacy{font-size:10.5px;color:#8a99a8;margin-top:6px;text-align:center}
.aichat-privacy a{color:#8a99a8;text-decoration:underline}
.aichat-rate{display:none;align-items:center;justify-content:center;gap:8px;font-size:12px;color:#5b6b7b;margin-top:4px}
.aichat-rate button{border:none;background:none;font-size:16px;cursor:pointer}

@media (max-width:520px){
  .aichat-root{right:12px;bottom:12px}
  /* iPhone fix: anchor to all four edges instead of 100vw/100vh math —
     on iOS Safari 100vw can exceed the visible viewport (overflow/zoom/bars),
     which pushed the panel wider than the screen. */
  .aichat-panel.aichat-open{
    position:fixed;left:0;right:0;top:0;bottom:0;
    width:auto;max-width:none;height:auto;max-height:none;border-radius:0;
    padding-bottom:env(safe-area-inset-bottom,0px);
  }
  .aichat-head{padding-top:calc(14px + env(safe-area-inset-top,0px))}
}
