/* The AI sales chat of the website (module AIChatIntegration). Colours and type come from website.css. */
.ws-chat-head { padding-bottom: 26px; }
.ws-chat { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; align-items: start; padding-top: 0; }

/* the agent's card: who answers and what to ask */
.ws-chat-side { position: sticky; top: 110px; padding: 26px 24px; border-radius: 24px; color: #fff;
    background: radial-gradient(90% 70% at 100% 0%, rgba(74, 155, 224, .45) 0%, rgba(74, 155, 224, 0) 70%), linear-gradient(160deg, var(--navy) 0%, var(--blue-deep) 100%); box-shadow: var(--shadow); }
.ws-chat-agent { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px dashed rgba(255, 255, 255, .25); }
.ws-chat-avatar { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: #fff; color: var(--red); }
.ws-chat-avatar svg { width: 26px; height: 26px; }
.ws-chat-agent b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1.25; }
.ws-chat-agent small { display: flex; align-items: center; gap: 7px; margin-top: 3px; font-size: .84rem; color: var(--sky-300); }
.ws-chat-agent small i { width: 8px; height: 8px; border-radius: 50%; background: #5fe0a5; box-shadow: 0 0 0 4px rgba(95, 224, 165, .2); }
.ws-chat-side h2 { margin: 20px 0 10px; font-size: 1rem; color: #fff; }
.ws-chat-side ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.ws-chat-side li { position: relative; padding-left: 20px; font-size: .95rem; line-height: 1.45; color: #e4f0fc; }
.ws-chat-side li::before { content: ''; position: absolute; left: 0; top: .55em; width: 9px; height: 2px; border-radius: 2px; background: var(--sky-300); }
.ws-chat-side p { margin-top: 16px; font-size: .92rem; line-height: 1.5; color: var(--sky-200); }
.ws-chat-side .ws-chat-fine { font-size: .8rem; color: var(--sky-300); }

/* the conversation */
.ws-chat-main { display: flex; flex-direction: column; min-height: 560px; border-radius: 24px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.ws-chat-thread { flex: 1 1 auto; display: flex; flex-direction: column; gap: 14px; max-height: 62vh; min-height: 340px; overflow-y: auto; padding: 26px 26px 12px; }
.ws-chat-thread { position: relative; }
.ws-chat-msg { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: min(640px, 88%); }
.ws-chat-msg.is-user { align-self: flex-end; align-items: flex-end; }
.ws-chat-bubble { padding: 12px 16px; border-radius: 6px 18px 18px 18px; background: var(--sky-50); border: 1px solid var(--sky-100); color: var(--ink); line-height: 1.55; overflow-wrap: anywhere; }
.ws-chat-msg.is-user .ws-chat-bubble { border-radius: 18px 6px 18px 18px; background: var(--navy); border-color: var(--navy); color: #fff; }
.ws-chat-bubble p + p, .ws-chat-bubble p + ul, .ws-chat-bubble ul + p { margin-top: 8px; }
.ws-chat-bubble ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.ws-chat-bubble strong { font-weight: 600; color: var(--navy); }
.ws-chat-msg.is-typing .ws-chat-bubble { display: flex; align-items: center; gap: 5px; color: var(--mist); }
.ws-chat-msg.is-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--sky-500); animation: ws-chat-wait 1.1s ease-in-out infinite; }
.ws-chat-msg.is-typing i:nth-child(2) { animation-delay: .15s; }
.ws-chat-msg.is-typing i:nth-child(3) { animation-delay: .3s; }
.ws-chat-msg.is-typing span { margin-left: 6px; font-size: .9rem; }
@keyframes ws-chat-wait { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* buttons made by the tools: open a hotel, or go to the booking */
.ws-chat-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-chat-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 14px; align-items: center; padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--navy); transition: box-shadow .15s ease, transform .15s ease, background-color .15s ease; }
.ws-chat-action small { grid-column: 1; font-size: .74rem; font-weight: 600; color: var(--mist); }
.ws-chat-action b { grid-column: 1; font-weight: 600; line-height: 1.3; }
.ws-chat-action span { grid-column: 2; grid-row: 1 / span 2; font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--blue); }
.ws-chat-action:hover { box-shadow: inset 0 0 0 1.5px var(--blue); transform: translateY(-1px); }
.ws-chat-action.is-book { flex: 1 1 100%; padding: 14px 18px; background: var(--red); color: #fff; box-shadow: 0 16px 30px -16px rgba(225, 37, 27, .8); }
.ws-chat-action.is-book small { color: rgba(255, 255, 255, .85); }
.ws-chat-action.is-book span { color: #fff; font-size: 1.2rem; }
.ws-chat-action.is-book:hover { background: var(--red-deep); box-shadow: 0 16px 30px -16px rgba(225, 37, 27, .9); }

.ws-chat-hints { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 26px 0; }
.ws-chat-hints[hidden] { display: none; }
.ws-chat-hints button { padding: 8px 14px; border: 1px solid var(--sky-200); border-radius: 999px; background: var(--sky-50); color: var(--blue-deep); font-weight: 500; font-size: .92rem; cursor: pointer; text-align: left; }
.ws-chat-hints button:hover { background: var(--sky-100); border-color: var(--sky-300); }

.ws-chat-form { display: flex; align-items: flex-end; gap: 10px; margin: 16px 20px 0; padding: 8px; border-radius: 18px; background: var(--sky-50); border: 1px solid var(--line); }
.ws-chat-form:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(74, 155, 224, .25); }
.ws-chat-form textarea { flex: 1 1 auto; min-height: 44px; max-height: 160px; padding: 10px 12px; border: 0; background: none; resize: none; line-height: 1.5; color: var(--navy); }
.ws-chat-form textarea:focus { outline: none; }
.ws-chat-form .ws-btn { flex: none; min-height: 44px; padding: 0 18px; }
.ws-chat-form .ws-btn:disabled { opacity: .55; cursor: progress; transform: none; }
.ws-chat-reset { align-self: flex-start; margin: 10px 26px 18px; padding: 0; border: 0; background: none; color: var(--mist); font-size: .86rem; text-decoration: underline; cursor: pointer; }
.ws-chat-reset[hidden] { display: none; }
.ws-chat-reset:hover { color: var(--blue); }
.ws-chat-form + .ws-chat-reset[hidden] + *, .ws-chat-main > .ws-chat-form:last-child { margin-bottom: 18px; }
.ws-chat-off { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 26px 24px; }

/* the chat button of the menu */
.ws-nav a.ws-nav-chat { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--sky-100); color: var(--blue); box-shadow: inset 0 0 0 1px var(--sky-200); font-variant-numeric: tabular-nums; }
.ws-nav a.ws-nav-chat:hover, .ws-nav a.ws-nav-chat[aria-current="page"] { background: var(--sky-200); color: var(--blue-deep); }
.ws-nav a.ws-nav-chat svg { width: 18px; height: 18px; }
.ws-nav a.ws-nav-chat + .ws-btn-ghost.ws-nav-btn { margin-left: 8px; }

@media (max-width: 980px) {
    .ws-chat { grid-template-columns: 1fr; }
    .ws-chat-side { position: static; order: 2; }
    .ws-chat-thread { max-height: 58vh; }
    .ws-nav a.ws-nav-chat, .ws-nav a.ws-nav-chat + .ws-btn-ghost.ws-nav-btn { margin: 6px 0 0; justify-content: center; }
}
@media (max-width: 700px) {
    .ws-chat-thread { padding: 18px 16px 8px; }
    .ws-chat-msg { max-width: 94%; }
    .ws-chat-hints { padding: 6px 16px 0; }
    .ws-chat-form { margin: 14px 12px 0; }
    .ws-chat-form .ws-btn span { display: none; }
    .ws-chat-reset { margin: 10px 16px 16px; }
}
@media (prefers-reduced-motion: reduce) { .ws-chat-msg.is-typing i { animation: none; } }
