/* ============================================
   GOBOT - Chat bot Go Logistics
   Stile coerente con il sito (oro #BD9867, crema #F3EEE5, serif Garamond)
   ============================================ */

/* --- Launcher (pulsante tondo in basso a destra) --- */
.gobot-launcher {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #F3EEE5;
    border: 2px solid #BD9867;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(189, 152, 103, 0.25);
    z-index: 999;
    transition: all 0.35s ease;
    padding: 0;
}

.gobot-launcher:hover {
    background: #BD9867;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(189, 152, 103, 0.4);
}

.gobot-launcher svg {
    width: 26px;
    height: 26px;
    stroke: #BD9867;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.3s ease;
}

.gobot-launcher:hover svg {
    stroke: #F3EEE5;
}

/* Se preferisci il logo al posto dell'icona: */
.gobot-launcher img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    filter: grayscale(1) brightness(0.9);
    transition: filter 0.3s ease;
}

.gobot-launcher:hover img {
    filter: none;
}

/* --- Tooltip (fumetto d'invito) --- */
.gobot-tooltip {
    position: fixed;
    bottom: 100px;
    right: 25px;
    background: #F3EEE5;
    color: #332F28;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid #BD9867;
    font-family: 'Garamond', 'Georgia', serif;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(189, 152, 103, 0.2);
    display: none;
    z-index: 998;
    animation: gobubbleAppear 0.5s ease-out;
    pointer-events: none;
    max-width: 260px;
}

.gobot-tooltip::after {
    content: '';
    position: absolute;
    bottom: -9px;
    right: 22px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 9px solid #F3EEE5;
}

.gobot-tooltip::before {
    content: '';
    position: absolute;
    bottom: -11px;
    right: 21px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 11px solid #BD9867;
}

@keyframes gobubbleAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Finestra chat --- */
.gobot-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 140px);
    background: #ffffff;
    border: 2px solid #BD9867;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(51, 47, 40, 0.15);
    display: none;
    flex-direction: column;
    z-index: 1000;
    font-family: 'Garamond', 'Georgia', serif;
    overflow: hidden;
}

.gobot-window.active {
    display: flex;
    animation: gobubbleAppear 0.3s ease-out;
}

/* Header chat */
.gobot-header {
    background: #BD9867;
    color: #F3EEE5;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
    letter-spacing: 1px;
}

.gobot-header span:first-child {
    font-weight: 400;
}

.gobot-close {
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.gobot-close:hover {
    opacity: 1;
}

/* Corpo chat */
.gobot-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #F3EEE5;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Messaggi */
.gobot-msg {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 85%;
    word-wrap: break-word;
    font-family: 'Garamond', 'Georgia', serif;
}

.gobot-msg.bot {
    background: #ffffff;
    border-left: 3px solid #BD9867;
    color: #332F28;
    align-self: flex-start;
}

.gobot-msg.user {
    background: #BD9867;
    color: #F3EEE5;
    align-self: flex-end;
}

/* Pulsante WhatsApp */
.wa-link-bot {
    display: inline-block;
    background: #25d366;
    color: #ffffff !important;
    text-align: center;
    padding: 9px 14px;
    margin-top: 6px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.wa-link-bot:hover {
    background: #128C7E;
}

/* Suggerimenti rapidi */
.gobot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.gobot-suggestion {
    background: #F3EEE5;
    border: 1px solid #BD9867;
    color: #332F28;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Garamond', 'Georgia', serif;
    letter-spacing: 0.3px;
}

.gobot-suggestion:hover {
    background: #BD9867;
    color: #F3EEE5;
}

/* Footer con input */
.gobot-footer {
    padding: 10px;
    background: #ffffff;
    border-top: 1px solid rgba(189, 152, 103, 0.25);
    display: flex;
    gap: 8px;
}

#gobot-input {
    flex: 1;
    border: none;
    border-bottom: 2px solid rgba(189, 152, 103, 0.3);
    padding: 8px 4px;
    outline: none;
    font-family: 'Garamond', 'Georgia', serif;
    font-size: 0.95rem;
    color: #332F28;
    background: transparent;
    transition: border-color 0.3s ease;
}

#gobot-input:focus {
    border-bottom-color: #BD9867;
}

.gobot-btn {
    background: #BD9867;
    color: #F3EEE5;
    border: 2px solid #BD9867;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Garamond', 'Georgia', serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.gobot-btn:hover {
    background: transparent;
    color: #BD9867;
}

/* --- Mobile --- */
@media (max-width: 480px) {
    .gobot-launcher {
        width: 54px;
        height: 54px;
        bottom: 20px;
        right: 20px;
    }

    .gobot-window {
        width: calc(100vw - 30px);
        height: calc(100vh - 160px);
        bottom: 85px;
        right: 15px;
    }

    .gobot-tooltip {
        bottom: 85px;
        right: 20px;
        font-size: 0.85rem;
        max-width: 220px;
    }
}