#rv-chat-panel{width:min(390px,calc(100vw - 32px));max-height:calc(100dvh - 100px);overflow:auto}
#rv-chat-panel h2{font-size:22px;margin:0;flex:1}#rv-chat-panel h3{font-size:19px;margin:16px 0}
#rv-chat-panel header>button{min-width:44px;min-height:44px}
#rv-chat .rv-bot-menu{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#rv-chat-panel button,#rv-chat-panel a{min-height:44px;border:1px solid #555;background:#292929;color:#fff;border-radius:5px;padding:10px 12px;font-size:14px;line-height:1.4;white-space:normal;cursor:pointer;text-decoration:none}
#rv-chat-panel a{display:block;margin:8px 0;overflow-wrap:anywhere}
#rv-chat-panel button:hover,#rv-chat-panel a:hover{border-color:#ffbd16;color:#ffbd16}
#rv-chat-panel label{display:block;margin:12px 0 5px;color:#fff;font-size:14px}
#rv-chat-panel input,#rv-chat-panel select{width:100%;min-height:44px;background:#252525;color:#fff;border:1px solid #666;border-radius:4px;padding:8px;font-size:16px;box-sizing:border-box}
#rv-chat-panel form>button{margin-top:10px;background:#ffbd16;color:#111;font-weight:700;width:100%}
#rv-chat-panel [role=status]:empty{display:none}#rv-chat-panel [role=status]{color:#ffcf58}
#rv-chat-panel p{font-size:14px;line-height:1.6}#rv-chat-panel :focus-visible{outline:3px solid #ffbd16;outline-offset:2px}

/* All viewport sizes: chat above the bottom-right rating badge. */
#rv-chat {
  right: max(16px, env(safe-area-inset-right));
  left: auto;
  bottom: calc(var(--rv-chat-bottom, 96px) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: calc(100vw - 32px);
}
#rv-chat-panel {
  max-height: max(100px, calc(100dvh - var(--rv-chat-bottom, 96px) - env(safe-area-inset-bottom) - 90px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Compact messaging launcher, matching the approved gold/charcoal design. */
#rv-chat #rv-chat-launcher {
 display: inline-flex; align-items: center; justify-content: center;
 width: 60px; height: 60px; min-width: 60px; min-height: 60px;
 padding: 0; border: 1px solid #e5a800; border-radius: 18px;
 background: linear-gradient(145deg, #ffda4a 0%, #ffbd16 58%, #efa900 100%);
 color: #202020; cursor: pointer;
 box-shadow: inset 0 1px 1px #fff5aa, 0 5px 18px #0008;
 transition: transform .16s ease, box-shadow .16s ease;
}
#rv-chat #rv-chat-launcher svg {display:block;width:42px;height:42px;pointer-events:none;}
@media (hover:hover) {
 #rv-chat #rv-chat-launcher:hover {transform:translateY(-2px);box-shadow:inset 0 1px 1px #fff5aa,0 7px 22px #0009;}
}
#rv-chat #rv-chat-launcher:focus-visible {outline:3px solid #fff;outline-offset:4px;}
#rv-chat #rv-chat-launcher:active {transform:translateY(0);}
@media (max-width:600px) {
 #rv-chat #rv-chat-launcher {width:56px;height:56px;min-width:56px;min-height:56px;border-radius:17px;}
 #rv-chat #rv-chat-launcher svg {width:39px;height:39px;}
}
@media (prefers-reduced-motion:reduce) {
 #rv-chat #rv-chat-launcher {transition:none;}
 #rv-chat #rv-chat-launcher:hover {transform:none;}
}

/* Emphasize matched products and ensure hidden fallback buttons stay hidden. */
#rv-chat-panel a.rv-bot-matched-product{font-weight:700}
#rv-chat-panel [hidden]{display:none!important}



/* Version 3: the native server-rendered BigCommerce form is mounted directly
   in the chat panel. No iframe, frame header or second quote page. */
#rv-chat-panel .rv-bot-quote-shell{width:100%;min-width:0;margin-top:10px}
#rv-chat-panel .rv-bot-quote-shell form{width:100%;min-width:0;margin:0;padding:0;background:transparent;border:0}
#rv-chat-panel .rv-bot-quote-shell h3{margin:6px 0 12px;font-size:17px;line-height:1.35}
#rv-chat-panel .rv-bot-quote-shell .form-row{display:grid;grid-template-columns:minmax(0,1fr);gap:0;margin:0}
#rv-chat-panel .rv-bot-quote-shell .form-field{width:100%;min-width:0;margin:0 0 11px;padding:0}
#rv-chat-panel .rv-bot-quote-shell .form-label{display:block;margin:4px 0 5px;font-size:14px;color:#fff;line-height:1.35}
#rv-chat-panel .rv-bot-quote-shell .form-input{display:block;width:100%;min-width:0;min-height:44px;padding:9px;background:#242424;color:#fff;border:1px solid #777;border-radius:4px;font-size:16px;box-sizing:border-box}
#rv-chat-panel .rv-bot-quote-shell .rv-quantity-control{width:100%;display:block}
#rv-chat-panel .rv-bot-quote-shell .rv-quantity-control [data-quantity-step]{display:none!important}
#rv-chat-panel .rv-bot-quote-shell [data-rv-message-field]{display:none!important}
#rv-chat-panel .rv-bot-quote-shell .form-actions{margin:12px 0 0;width:100%}
#rv-chat-panel .rv-bot-quote-shell input[type=submit],#rv-chat-panel .rv-bot-quote-shell button[type=submit]{display:block;width:100%;height:auto;min-height:46px;margin:0;background:#ffbd16;color:#111;font-size:15px;font-weight:700;border:1px solid #e4a800;border-radius:4px;cursor:pointer}
#rv-chat-panel .rv-bot-quote-shell input[type=submit]:hover{background:#ffd557;color:#111}
#rv-chat-panel .rv-bot-quote-shell input[type=submit]:disabled{opacity:.65;cursor:wait}
#rv-chat-panel .rv-bot-quote-shell .rv-price-note{margin:8px 0;color:#ddd;font-size:12px}
#rv-chat-panel .rv-bot-quote-shell .rv-bot-quote-feedback{color:#ffcf58;font-size:13px;margin:12px 0}
#rv-chat-panel .rv-bot-quote-shell .rv-bot-quote-success{font-weight:700;color:#ffcf58;margin:8px 0}
#rv-chat-panel .rv-bot-quote-shell .g-recaptcha{max-width:100%;overflow:hidden;margin-bottom:10px}
#rv-chat-panel .rv-bot-quote-loading{color:#ffcf58;margin:10px 0}
#rv-chat-panel #rv-bot-work{min-width:0}
