/* SkyBook AI assistant: isolated styles so property SkyBookHotel.css can't accidentally inherit generic modal rules. */
/* Button foreground theme: each property can set
   .sbai-root { --sbai-button-text: #fff; } in SkyBookHotel.css.
   Keep fallback in var() rather than defining the variable here, so an earlier
   property stylesheet override is not replaced by this later stylesheet. */
.sbai-root { --sbai-accent: var(--main-buttoncolordark, #538fbd); --sbai-accent-strip: var(--main-barcolor, #fbab50); font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #213047; }
.sbai-root *, .sbai-root *::before, .sbai-root *::after { box-sizing: border-box; }
.sbai-root button, .sbai-root textarea { font-family: inherit; }
.sbai-launcher {
    position: fixed;
    right: 18px;
    bottom: var(--sbai-launcher-bottom, 18px);
    z-index: 1010;
    min-width: 56px;
    height: 54px;
    padding: 0 17px;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 30px;
    background: var(--sbai-accent);
    color: var(--sbai-button-text, #102438);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 5px 22px rgba(15,23,42,.25);
    cursor: pointer;
    transition: bottom .15s ease, box-shadow .15s ease;
}
.sbai-launcher svg { height:23px; width:23px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.sbai-launcher:hover { box-shadow:0 7px 27px rgba(15,23,42,.32); }
.sbai-root button:focus-visible, .sbai-root textarea:focus-visible { outline:3px solid var(--main-buttoncolordark, #538fbd); outline-offset:2px; }
.sbai-panel { display:none; position:fixed; right:18px; bottom:calc(var(--sbai-launcher-bottom, 18px) + 67px); z-index:1020; width:min(394px, calc(100vw - 28px)); height:min(550px, calc(100dvh - 110px)); min-height:270px; background:#fff; border:1px solid rgba(148,163,184,.38); border-radius:17px; box-shadow:0 20px 65px rgba(15,23,42,.28); overflow:hidden; flex-direction:column; }
.sbai-root.sbai-open .sbai-panel { display:flex; }
.sbai-root.sbai-open .sbai-launcher { display:none; }
.sbai-root.sbai-open .sbai-panel { bottom:var(--sbai-launcher-bottom, 18px); }
.sbai-header { flex:none; display:flex; align-items:center; justify-content:space-between; min-height:76px; padding:12px 13px 12px 16px; background:#f8fafc; border-top:4px solid var(--sbai-accent-strip); border-bottom:1px solid #e2e8f0; }
.sbai-heading-wrap { display:flex; align-items:center; gap:11px; min-width:0; }
.sbai-avatar { display:flex; align-items:center; justify-content:center; width:38px; height:38px; flex:none; border-radius:12px; background:var(--sbai-accent); color:var(--sbai-button-text, #102438); font-size:22px; }
.sbai-heading-wrap h2 { margin:0; font-size:16px; color:#17253a; font-weight:700; line-height:1.4; }
.sbai-heading-wrap p { margin:1px 0 0; font-size:12px; color:#64748b; }
.sbai-icon-button { border:0; background:transparent; width:40px; height:40px; border-radius:10px; color:#526275; font-size:29px; cursor:pointer; }
.sbai-icon-button:hover { background:#e8edf3; }
.sbai-messages { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:18px 14px; background:#fff; }
.sbai-message { display:flex; margin:0 0 12px; }
.sbai-message-user { justify-content:flex-end; }
.sbai-bubble { max-width:89%; background:#f0f4f8; color:#25354b; padding:11px 13px; border-radius:14px 14px 14px 4px; line-height:1.5; overflow-wrap:anywhere; }
.sbai-message-user .sbai-bubble { background:#d8eafa; border-radius:14px 14px 4px 14px; }
.sbai-suggestions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 0; }
.sbai-suggestions button { border:1px solid #bdd4e9; background:white; color:#335a7e; font-size:12px; border-radius:20px; padding:8px 11px; cursor:pointer; }
.sbai-suggestions button:hover { background:#eef6fc; }
.sbai-composer { flex:none; padding:11px 12px 10px; background:#fff; border-top:1px solid #e2e8f0; }
.sbai-input-wrap { display:flex; align-items:end; gap:8px; padding:7px 7px 7px 11px; border:1px solid #cbd5e1; border-radius:13px; }
.sbai-input-wrap:focus-within { border-color:#669ccb; box-shadow:0 0 0 2px rgba(102,156,203,.15); }
.sbai-input-wrap textarea { resize:none; display:block; flex:1; min-width:0; max-height:112px; min-height:27px; border:0; padding:3px 0; background:transparent; box-shadow:none; outline:0; font-size:14px; line-height:20px; color:#17253a; }
.sbai-input-wrap textarea:focus { outline:none; box-shadow:none; }
.sbai-input-wrap > button { display:flex; align-items:center; justify-content:center; height:34px; width:36px; flex:none; border:0; border-radius:9px; background:var(--sbai-accent); color:var(--sbai-button-text, #102438); cursor:pointer; }
.sbai-input-wrap > button:disabled { opacity:.43; cursor:default; }
.sbai-input-wrap svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.sbai-disclaimer { text-align:center; color:#64748b; font-size:10px; line-height:1.4; margin:8px 0 0; }
@media (max-width:600px) {
  .sbai-launcher { right:12px; min-width:49px; height:49px; padding:0 13px; font-size:13px; }
  .sbai-panel, .sbai-root.sbai-open .sbai-panel { inset:0; width:100vw; height:100dvh; min-height:0; max-height:none; border:0; border-radius:0; }
  .sbai-header { padding-top:max(12px,env(safe-area-inset-top)); }
  .sbai-composer { padding-bottom:max(11px,env(safe-area-inset-bottom)); }
  .sbai-root.sbai-open .sbai-panel { z-index:2000; }
}
.sbai-suggestions[hidden] { display:none; }


/* Availability results: individual room cards, scoped to the Booking Assistant. */
.sbai-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 14px;
    width: 100%;
}
.sbai-result-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15,23,42,.035);
    color: #213047;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.sbai-result-card strong {
    display: block;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    color: #17253a;
}
.sbai-result-card > div {
    font-size: 13px;
    color: #526275;
    line-height: 1.45;
}

/* Booking Assistant busy indicator (theme-aware, no dependency on page modals). */
.sbai-working-bubble { display:inline-flex; align-items:center; gap:10px; font-size:13px; color:#526275; }
.sbai-typing-dots { display:inline-flex; gap:4px; align-items:center; min-width:29px; }
.sbai-typing-dots span { display:block; width:6px; height:6px; border-radius:50%; background:var(--sbai-accent); animation:sbai-typing 1.1s ease-in-out infinite; }
.sbai-typing-dots span:nth-child(2) { animation-delay:.15s; }
.sbai-typing-dots span:nth-child(3) { animation-delay:.30s; }
@keyframes sbai-typing { 0%,60%,100% { transform:translateY(0); opacity:.45; } 30% { transform:translateY(-5px); opacity:1; } }
.sbai-send-spinner { display:block; width:18px; height:18px; border:2px solid rgba(20,47,67,.22); border-top-color:#142f43; border-radius:50%; animation:sbai-spin .75s linear infinite; }
@keyframes sbai-spin { to { transform:rotate(360deg); } }
.sbai-root.sbai-busy .sbai-input-wrap > button:disabled { opacity:1; cursor:wait; }
.sbai-root.sbai-busy .sbai-input-wrap textarea { cursor:wait; }
@media (prefers-reduced-motion:reduce) { .sbai-typing-dots span, .sbai-send-spinner { animation:none; opacity:1; } }

/* Confirmed-search action: applies criteria through SkyBook's normal postback. */
.sbai-action-row { margin: 2px 0 16px; }
.sbai-view-rooms { display:block; width:100%; padding:12px 14px; border-radius:11px; border:1px solid rgba(15,23,42,.2); background:var(--sbai-accent); color:#102438; font-weight:700; font-size:14px; text-align:center; cursor:pointer; }
.sbai-view-rooms:hover { filter:brightness(.97); }

/* Clickable individual room results; keep the card look and a visible focus ring. */
.sbai-result-select { width:100%; box-sizing:border-box; text-align:left; font:inherit; cursor:pointer; appearance:none; -webkit-appearance:none; }
.sbai-result-select:hover { border-color:var(--sbai-accent); box-shadow:0 4px 12px rgba(15,23,42,.10); }
.sbai-result-select:focus-visible { outline:3px solid var(--sbai-accent); outline-offset:2px; }

/* Grouped, read-only activity availability */
.sbai-activity-group .sbai-activity-meta{font-size:.85em;color:#52657d;margin:.3em 0 .6em;}
.sbai-activity-times{display:flex;flex-direction:column;gap:6px;}
.sbai-activity-slot{display:flex;gap:8px;justify-content:space-between;align-items:center;background:#f3f7fb;border-radius:8px;padding:8px 10px;font-size:.84em;}
.sbai-activity-slot span{color:#52657d;font-size:.92em;text-align:right;}
.sbai-activity-note{font-size:.82em;color:#52657d;padding:2px 6px;}

/* Room/site actions: primary selection stays inside each clickable result card.
   The whole card remains the existing native selection button (no nested buttons). */
.sbai-result-select { gap: 8px; }
.sbai-result-select .sbai-primary-action {
    display:flex; align-items:center; justify-content:center; width:100%;
    min-height:40px; margin-top:7px; padding:9px 11px; border-radius:9px;
    background:var(--sbai-accent); color:var(--sbai-button-text, #102438); font-size:13px;
    line-height:1.3; font-weight:750; text-align:center;
    border:1px solid rgba(15,23,42,.12);
}
.sbai-result-select:hover .sbai-primary-action { filter:brightness(.97); }
/* Optional browse-all action is intentionally secondary, not a competing CTA. */
.sbai-action-row { margin:0 0 12px; text-align:center; }
.sbai-view-rooms {
    display:inline; width:auto; padding:5px 2px; border:0; border-radius:0;
    background:transparent; color:#526275; text-decoration:underline;
    font-size:12px; font-weight:600; line-height:1.5; box-shadow:none;
}
.sbai-view-rooms:hover { color:#213047; background:transparent; filter:none; }

/* Add-on cards: theme-aware controls and visible planned state. */
.sbai-addon-card { gap:10px; }
.sbai-addon-description { margin:0; color:#526275; font-size:12px; line-height:1.45; }
.sbai-addon-price { color:#334155; font-size:13px; font-weight:650; }
.sbai-addon-day { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:9px; padding:11px 0; border-top:1px solid #e2e8f0; }
.sbai-addon-day-info { display:flex; flex-direction:column; gap:2px; min-width:0; }
.sbai-addon-day-info strong { font-size:12px; font-weight:650; }
.sbai-addon-day-info span { color:#64748b; font-size:11px; }
.sbai-addon-choice { display:flex; align-items:center; gap:7px; flex:1 1 154px; justify-content:flex-end; }
.sbai-addon-qty { height:37px; width:55px; padding:0 5px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#243245; font:inherit; }
.sbai-addon-add { min-height:38px; padding:8px 11px; flex:1 1 auto; max-width:192px; border:1px solid rgba(15,23,42,.13); border-radius:9px; background:var(--sbai-accent); color:var(--sbai-button-text, #102438); font:inherit; font-size:12px; font-weight:750; cursor:pointer; }
.sbai-addon-add:hover:not(:disabled) { filter:brightness(.97); }
.sbai-addon-add.is-planned { background:#edf4fa; color:#315c80; border-color:#b7d0e5; }
.sbai-addon-add:disabled { cursor:wait; opacity:.72; }
.sbai-addon-all { padding:7px 0; text-decoration:underline; background:none; border:0; font:inherit; font-size:12px; cursor:pointer; color:#365f82; }
@media(max-width:440px) { .sbai-addon-day-info { flex-basis:100%; } .sbai-addon-choice { justify-content:stretch; } .sbai-addon-add { max-width:none; } }


/* Activity booking actions — restored from the verified integration styling.
   Keep time/capacity on top and the booking control on its own row. */
.sbai-root .sbai-activity-slot {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:5px 9px;
    padding:10px 11px;
    min-width:0;
}
.sbai-root .sbai-activity-slot > strong {
    display:block;
    min-width:0;
    font-size:13px;
    line-height:1.3;
    font-weight:750;
    white-space:nowrap;
    overflow-wrap:normal;
}
.sbai-root .sbai-activity-slot > span {
    display:block;
    color:#52657d;
    font-size:11px;
    line-height:1.35;
    text-align:right;
    white-space:nowrap;
}
.sbai-root .sbai-activity-choice {
    grid-column:1 / -1;
    display:flex;
    align-items:center;
    width:100%;
    min-width:0;
    gap:8px;
    margin-top:3px;
}
.sbai-root .sbai-activity-choice select {
    width:72px;
    min-width:72px;
    height:38px;
    padding:0 8px;
    border:1px solid #cbd5e1;
    border-radius:9px;
    background:#fff;
    color:#213047;
    font:inherit;
    font-size:13px;
}
.sbai-root .sbai-activity-add {
    display:flex;
    flex:1 1 0;
    align-items:center;
    justify-content:center;
    min-width:0;
    min-height:40px;
    padding:9px 10px;
    border:1px solid rgba(15,23,42,.14);
    border-radius:9px;
    background:var(--sbai-accent);
    color:var(--sbai-button-text, #102438);
    font:inherit;
    font-size:13px;
    font-weight:750;
    line-height:1.25;
    text-align:center;
    cursor:pointer;
}
.sbai-root .sbai-activity-add:hover:not(:disabled) { filter:brightness(.96); }
.sbai-root .sbai-activity-add:disabled { opacity:.7; cursor:default; }
.sbai-root .sbai-activity-check { margin-top:8px; width:100%; }
@media(max-width:360px) {
    .sbai-root .sbai-activity-slot { grid-template-columns:minmax(0,1fr); }
    .sbai-root .sbai-activity-slot > strong { white-space:normal; }
    .sbai-root .sbai-activity-slot > span { text-align:left; }
}

/* Desktop pointer-only invitation. No popup state, click handler, or dismiss button. */
.sbai-hover-hint {
    display: none;
}
@media (hover: hover) and (pointer: fine) and (min-width: 601px) {
    .sbai-hover-hint {
        display: block;
        position: fixed;
        right: 18px;
        bottom: calc(var(--sbai-launcher-bottom, 18px) + 66px);
        z-index: 1010;
        width: max-content;
        max-width: min(280px, calc(100vw - 36px));
        padding: 11px 14px;
        background: #fff;
        color: #25354b;
        border: 1px solid #dbe3ec;
        border-radius: 12px;
        box-shadow: 0 5px 20px rgba(15,23,42,.14);
        font-size: 13px;
        line-height: 1.45;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    .sbai-root:not(.sbai-open) .sbai-launcher:hover + .sbai-hover-hint {
        opacity: 1;
        visibility: visible;
    }
}
