.vfc-chat {
    --vfc-ink: #171717;
    --vfc-muted: #6f6b62;
    --vfc-gold: #d4af37;
    --vfc-line: rgba(23, 23, 23, 0.12);
    --vfc-shadow: 0 20px 54px rgba(0, 0, 0, 0.22);
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;
    font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--vfc-ink);
    -webkit-font-smoothing: antialiased;
}

.vfc-launcher {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(180deg, #f3cf5b, #d4af37);
    color: #171717;
    font-weight: 800;
    box-shadow: var(--vfc-shadow);
    cursor: pointer;
}

.vfc-launcher-dot {
    width: 10px;
    height: 10px;
    border-radius: 99px;
    background: #171717;
    box-shadow: 0 0 0 5px rgba(23, 23, 23, 0.12);
}

.vfc-panel {
    position: absolute;
    right: 0;
    bottom: 66px;
    display: none;
    width: min(380px, calc(100vw - 28px));
    overflow: hidden;
    border: 1px solid var(--vfc-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--vfc-shadow);
}

.vfc-chat.is-open .vfc-panel {
    display: block;
}

.vfc-chat.is-open .vfc-launcher {
    display: none;
}

.vfc-panel[hidden] {
    display: none !important;
}

.vfc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    background: #171717;
    color: #fff;
}

.vfc-head strong,
.vfc-head span {
    display: block;
}

.vfc-head span {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
}

.vfc-head button,
.vfc-head [data-vfc-close] {
    appearance: none;
    -webkit-appearance: none;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    text-align: center;
}

.vfc-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 360px;
    max-height: 56vh;
    padding: 16px;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #f7f4ee;
}

.vfc-msg {
    max-width: 86%;
    padding: 11px 13px;
    border-radius: 16px;
    white-space: pre-line;
    font-size: 14px;
    line-height: 1.42;
}

.vfc-bot,
.vfc-typing {
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.vfc-user {
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    background: #171717;
    color: #fff;
}

.vfc-typing {
    color: var(--vfc-muted);
    font-style: italic;
}

.vfc-quick {
    display: flex;
    gap: 8px;
    padding: 10px 12px 0;
    overflow-x: auto;
    background: #fff;
}

.vfc-quick button {
    flex: 0 0 auto;
    min-height: 34px;
    border: 1px solid var(--vfc-line);
    border-radius: 99px;
    background: #fff;
    color: var(--vfc-ink);
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.vfc-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 10px 12px 12px;
    background: #fff;
}

.vfc-form input {
    min-height: 44px;
    min-width: 0;
    border: 1px solid var(--vfc-line);
    border-radius: 12px;
    padding: 0 12px;
    font: inherit;
    font-size: 16px;
}

.vfc-form button {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    padding: 0 14px;
    background: var(--vfc-gold);
    color: #171717;
    font-weight: 850;
    cursor: pointer;
}

.vfc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 11px 12px 0;
    background: #fff;
    border-top: 1px solid rgba(23, 23, 23, 0.08);
}

.vfc-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 850;
    text-align: center;
    text-decoration: none;
}

.vfc-action-booking {
    background: #171717;
    color: #fff;
}

.vfc-action-whatsapp {
    border: 1px solid rgba(23, 107, 58, 0.22);
    background: #eef8f1;
    color: #176b3a;
}

@media (max-width: 560px) {
    html.vfc-chat-lock,
    body.vfc-chat-lock {
        overflow: hidden;
    }

    .vfc-chat {
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        left: auto;
    }

    .vfc-launcher {
        min-height: 50px;
        max-width: calc(100vw - 24px);
        padding: 0 16px;
        font-size: 14px;
    }

    .vfc-panel {
        position: fixed;
        right: 10px;
        bottom: max(74px, calc(66px + env(safe-area-inset-bottom)));
        left: 10px;
        grid-template-rows: auto minmax(0, 1fr) auto auto;
        width: auto;
        height: min(620px, 72dvh);
        max-height: calc(100dvh - 112px - env(safe-area-inset-bottom));
        border-radius: 18px 18px 16px 16px;
    }

    .vfc-chat.is-open .vfc-panel {
        display: grid;
    }

    .vfc-head {
        padding: 14px 14px 13px;
    }

    .vfc-head strong {
        font-size: 14px;
        line-height: 1.25;
    }

    .vfc-head span {
        max-width: 260px;
        font-size: 11.5px;
        line-height: 1.35;
    }

    .vfc-head button,
    .vfc-head [data-vfc-close] {
        width: 38px;
        height: 38px;
        flex: 0 0 auto;
        position: relative;
        z-index: 2;
        touch-action: manipulation;
    }

    .vfc-messages {
        height: auto;
        min-height: 0;
        max-height: none;
        padding: 12px;
    }

    .vfc-msg {
        max-width: 92%;
        padding: 10px 12px;
        font-size: 13.5px;
        line-height: 1.38;
    }

    .vfc-quick {
        padding: 9px 10px 0;
        scrollbar-width: none;
    }

    .vfc-quick::-webkit-scrollbar {
        display: none;
    }

    .vfc-quick button {
        min-height: 36px;
        padding: 0 12px;
    }

    .vfc-form {
        grid-template-columns: minmax(0, 1fr) 92px;
        gap: 8px;
        padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
    }

    .vfc-form input,
    .vfc-form button {
        min-height: 48px;
        border-radius: 13px;
    }

    .vfc-form button {
        padding: 0 10px;
    }

    .vfc-actions {
        gap: 8px;
        padding: 10px 10px 0;
        border-top: 1px solid rgba(23, 23, 23, 0.08);
    }

    .vfc-action {
        min-height: 44px;
        border-radius: 13px;
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .vfc-panel {
        right: 8px;
        left: 8px;
        height: min(590px, 70dvh);
    }

    .vfc-form {
        grid-template-columns: minmax(0, 1fr) 78px;
    }

    .vfc-launcher {
        font-size: 13px;
    }
}
