/* Vanterra SMS Chat Widget */

#vt-chat-widget{position:fixed;bottom:20px;z-index:2147483000;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;color:#1a1a1a}
#vt-chat-widget.vt-chat--right{right:20px}
#vt-chat-widget.vt-chat--left{left:20px}
#vt-chat-widget *,#vt-chat-widget *::before,#vt-chat-widget *::after{box-sizing:border-box}
#vt-chat-widget[hidden]{display:none}

/* Launcher */
.vt-chat__launcher{display:inline-flex;align-items:center;gap:10px;background:var(--vt-chat-primary,#2d1b4e);color:#fff;border:none;border-radius:999px;padding:14px 22px;font-size:16px;font-weight:700;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.25);transition:transform .15s ease,box-shadow .15s ease}
.vt-chat__launcher:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(0,0,0,.3)}
.vt-chat__launcher-icon{display:inline-flex}
#vt-chat-widget[data-state="open"] .vt-chat__launcher{padding:0;width:56px;height:56px;justify-content:center;border-radius:50%}
#vt-chat-widget[data-state="open"] .vt-chat__launcher-label{display:none}
#vt-chat-widget[data-state="open"] .vt-chat__launcher-icon::before{content:"\00d7";font-size:30px;line-height:1}
#vt-chat-widget[data-state="open"] .vt-chat__launcher-icon svg{display:none}

/* Panel */
.vt-chat__panel{position:absolute;bottom:74px;width:380px;max-width:calc(100vw - 40px);max-height:min(640px,calc(100vh - 110px));background:#fff;border-radius:16px;box-shadow:0 12px 40px rgba(0,0,0,.28);overflow:hidden;display:flex;flex-direction:column;animation:vtChatIn .18s ease}
#vt-chat-widget.vt-chat--right .vt-chat__panel{right:0}
#vt-chat-widget.vt-chat--left .vt-chat__panel{left:0}
.vt-chat__panel[hidden]{display:none}
@keyframes vtChatIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}

.vt-chat__header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 16px;background:var(--vt-chat-primary,#2d1b4e);color:#fff}
.vt-chat__header-brand{display:flex;align-items:center;gap:10px;min-width:0}
.vt-chat__header-icon{display:inline-flex;flex:0 0 auto}
.vt-chat__header-title{font-size:16px;font-weight:700}
.vt-chat__close{background:transparent;border:none;color:#fff;font-size:24px;line-height:1;cursor:pointer;padding:0 4px}

.vt-chat__body{padding:14px 16px;overflow-y:auto}

.vt-chat__greeting{display:flex;gap:10px;align-items:center;background:#f3f4f6;border-radius:10px;padding:10px 12px;margin-bottom:12px}
.vt-chat__greeting p{margin:0;font-size:14px;line-height:1.35;color:#333}

.vt-chat__avatar{flex:0 0 auto;width:32px;height:32px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;background:#fff;border:1px solid #e5e7eb;color:var(--vt-chat-accent,#3b82f6)}
.vt-chat__avatar img,img.vt-chat__avatar{width:100%;height:100%;object-fit:contain}

/* Gravity Form inside the panel */
/* Keep First/Last name side by side even in the narrow panel (overrides the global container-query that forces full width below 600px) */
#vt-chat-widget .vt-chat__form .gfield.vt-chat-name{grid-column:span 6!important;width:auto!important;padding-right:0!important}
#vt-chat-widget .vt-chat__form .gform_button{background:var(--vt-chat-primary,#2d1b4e)!important}
#vt-chat-widget .vt-chat__form input:focus,#vt-chat-widget .vt-chat__form textarea:focus{border-color:var(--vt-chat-accent,#3b82f6)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--vt-chat-accent,#3b82f6) 25%,transparent)!important}

/* Teaser bubble */
.vt-chat__teaser{position:absolute;bottom:74px;width:300px;max-width:calc(100vw - 40px);display:flex;gap:10px;align-items:flex-start;background:#fff;border-radius:14px;padding:14px 36px 14px 14px;box-shadow:0 10px 30px rgba(0,0,0,.22);animation:vtChatIn .2s ease}
#vt-chat-widget.vt-chat--right .vt-chat__teaser{right:0}
#vt-chat-widget.vt-chat--left .vt-chat__teaser{left:0}
.vt-chat__teaser[hidden]{display:none}
.vt-chat__teaser-text{margin:0;font-size:14px;color:#333;cursor:pointer}
.vt-chat__teaser-close{position:absolute;top:6px;right:8px;background:transparent;border:none;font-size:20px;line-height:1;color:#888;cursor:pointer}
#vt-chat-widget[data-state="open"] .vt-chat__teaser{display:none}

/* Success state */
#vt-chat-widget.vt-chat--success .vt-chat__greeting{display:none}
.vt-chat__body .vt-sms-confirmation{padding:28px 12px}

/* Hide the floating launcher + teaser on mobile (integrate with an external trigger instead) */
@media (max-width:480px){
    #vt-chat-widget.vt-chat--hide-launcher-mobile .vt-chat__launcher,
    #vt-chat-widget.vt-chat--hide-launcher-mobile .vt-chat__teaser{display:none!important}
}

/* Mobile: bottom sheet */
@media (max-width:480px){
    #vt-chat-widget{bottom:12px}
    #vt-chat-widget.vt-chat--right{right:12px}
    #vt-chat-widget.vt-chat--left{left:12px}
    .vt-chat__panel{position:fixed;left:0;right:0;bottom:0;width:100vw;max-width:100vw;max-height:88vh;border-radius:16px 16px 0 0}
}

@media (prefers-reduced-motion:reduce){#vt-chat-widget *{transition:none!important;animation:none!important}}
