/**
 * The Go Tropical chat bubble.
 *
 * Scoped under .gtcai-chat so nothing here can reach the rest of the site, and
 * written against its own variables so the colours can be changed in one place.
 */

.gtcai-chat {
    --gtcai-ink: #1d2320;
    --gtcai-dark: #13261f;
    --gtcai-gold: #c9b47f;
    --gtcai-line: #e5e0d6;
    --gtcai-bot: #f4f1ea;
    --gtcai-me: #13261f;
    --gtcai-send: #FB176E;

    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99998;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--gtcai-ink);
}

/* The bubble */

.gtcai-chat__launcher {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    padding: 13px 20px;
    background: var(--gtcai-dark);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gtcai-chat__launcher:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}

.gtcai-chat__launcher svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.gtcai-chat.is-open .gtcai-chat__launcher {
    display: none;
}

/* The panel */

.gtcai-chat__panel {
    display: none;
    flex-direction: column;
    width: 370px;
    max-width: calc(100vw - 32px);
    height: 540px;
    max-height: calc(100vh - 110px);
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.gtcai-chat.is-open .gtcai-chat__panel {
    display: flex;
}

.gtcai-chat__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: var(--gtcai-dark);
    color: #fff;
}

.gtcai-chat__head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.gtcai-chat__head p {
    margin: 2px 0 0;
    font-size: 12.5px;
    opacity: 0.75;
}

.gtcai-chat__close {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    padding: 4px 6px;
    cursor: pointer;
    opacity: 0.8;
}

.gtcai-chat__close:hover {
    opacity: 1;
}

.gtcai-chat__log {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
}

.gtcai-chat__msg {
    max-width: 85%;
    padding: 11px 14px;
    border-radius: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.gtcai-chat__msg--bot {
    background: var(--gtcai-bot);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.gtcai-chat__msg--me {
    background: var(--gtcai-me);
    color: #fff;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

/* Listings inside an answer */

.gtcai-chat__cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-self: stretch;
}

.gtcai-chat__card {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--gtcai-line);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: border-color 0.15s ease;
}

.gtcai-chat__card:hover {
    border-color: var(--gtcai-gold);
}

.gtcai-chat__card img {
    width: 62px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 auto;
    background: var(--gtcai-bot);
}

.gtcai-chat__card b {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
}

.gtcai-chat__card span {
    display: block;
    font-size: 12.5px;
    color: #6c6f6b;
}

/* Handing over to a person */

.gtcai-chat__whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 10px 15px;
    border-radius: 999px;
    background: #25d366;
    color: #06381a;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.gtcai-chat__whatsapp:hover {
    filter: brightness(1.05);
    color: #06381a;
}

.gtcai-chat__whatsapp svg {
    width: 18px;
    height: 18px;
}

/* One-tap answers */

.gtcai-chat__choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-self: flex-start;
}

.gtcai-chat__choice {
    border: 1px solid var(--gtcai-line);
    background: #fff;
    color: var(--gtcai-ink);
    border-radius: 999px;
    padding: 9px 15px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.gtcai-chat__choice:hover {
    border-color: var(--gtcai-send);
    color: var(--gtcai-send);
}

/* Waiting */

.gtcai-chat__dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.gtcai-chat__dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9a9d98;
    animation: gtcai-bounce 1.2s infinite ease-in-out;
}

.gtcai-chat__dots i:nth-child(2) { animation-delay: 0.15s; }
.gtcai-chat__dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes gtcai-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.55; }
    30%           { transform: translateY(-4px); opacity: 1; }
}

/* Asking */

.gtcai-chat__form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--gtcai-line);
    background: #fff;
}

.gtcai-chat__form input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid var(--gtcai-line);
    border-radius: 999px;
    padding: 11px 15px;
    font: inherit;
    color: inherit;
    background: #fff;
}

.gtcai-chat__form input:focus {
    outline: 2px solid var(--gtcai-gold);
    outline-offset: 1px;
}

.gtcai-chat__form button {
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    background: var(--gtcai-send);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.gtcai-chat__form button:hover {
    filter: brightness(0.93);
}

.gtcai-chat__form button[disabled] {
    opacity: 0.5;
    cursor: default;
}

.gtcai-chat__foot {
    padding: 0 18px 12px;
    font-size: 11.5px;
    color: #8a8d88;
}

.gtcai-chat__foot a {
    color: #6c6f6b;
}

@media (max-width: 480px) {
    .gtcai-chat {
        right: 12px;
        bottom: 12px;
    }

    .gtcai-chat__panel {
        width: calc(100vw - 24px);
        height: calc(100vh - 90px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gtcai-chat__launcher,
    .gtcai-chat__dots i {
        transition: none;
        animation: none;
    }
}
