/* ---------- COLOURS: rub-chat.js reads the real logo colours automatically and overwrites these defaults ---------- */
:root{
   --rub-chat-primary:#0b3d6e !important;
  --rub-chat-primary-dark:#072a4d;
  --rub-chat-accent:#e8590c;
  --rub-chat-light:#f1f5f9;
}

/* ---------- RIGHT-WALL STICKY BUTTONS ---------- */
.rub-chat-fab{
  position:fixed;right:0;width:52px;height:52px;display:flex;align-items:center;justify-content:center;
  color:#fff;text-decoration:none;border:0;cursor:pointer;z-index:999999;
  border-radius:14px 0 0 14px;box-shadow:-4px 5px 18px rgba(0,0,0,.22);
  transition:transform .3s ease,box-shadow .3s ease;
}
.rub-chat-fab svg{width:24px;height:24px;fill:currentColor}
.rub-chat-fab:hover{transform:translateX(-7px);color:#fff;box-shadow:-8px 8px 25px rgba(0,0,0,.3)}
.rub-chat-fab-call{bottom:235px;background:#0d6efd}
.rub-chat-fab-whatsapp{bottom:175px;background:#25D366}
.rub-chat-fab-chat{bottom:115px;background:var(--rub-chat-primary)}
.rub-chat-fab-chat::after{
  content:"";position:absolute;top:7px;left:7px;width:10px;height:10px;border-radius:50%;
  background:var(--rub-chat-accent);animation:rubChatPulse 2s infinite;
}
@keyframes rubChatPulse{0%{box-shadow:0 0 0 0 rgba(232,89,12,.6)}70%{box-shadow:0 0 0 9px rgba(232,89,12,0)}100%{box-shadow:0 0 0 0 rgba(232,89,12,0)}}

/* ---------- CHAT WINDOW ---------- */
.rub-chat-window{
  position:fixed;right:62px;bottom:20px;width:380px;max-width:calc(100vw - 80px);
  height:600px;max-height:calc(100vh - 40px);display:none;flex-direction:column;
  background:#fff;border-radius:16px;overflow:hidden;z-index:999998;
  box-shadow:0 18px 50px rgba(0,0,0,.28);font-family:"Segoe UI",Roboto,Arial,sans-serif;
}
.rub-chat-window.rub-chat-open{display:flex;animation:rubChatIn .25s ease}
@keyframes rubChatIn{from{opacity:0;transform:translateX(30px)}to{opacity:1;transform:none}}

.rub-chat-header{
  display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;color:#fff;
  background:linear-gradient(135deg,var(--rub-chat-primary),var(--rub-chat-primary-dark));
  border-bottom:3px solid var(--rub-chat-accent);
}
.rub-chat-logo-wrap{flex:1;display:flex;justify-content:center;min-width:0}
.rub-chat-logo{display:block;height:50px;max-width:100%;width:auto;object-fit:contain;background:#000;border-radius:8px;padding:4px 10px}
.rub-chat-hbtn{
  width:32px;height:32px;border:0;border-radius:50%;background:rgba(255,255,255,.15);color:#fff;
  display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none;transition:background .2s;
}
.rub-chat-hbtn:hover{background:rgba(255,255,255,.3)}
.rub-chat-hbtn svg{width:16px;height:16px;fill:currentColor}

.rub-chat-body{flex:1;overflow-y:auto;padding:14px;background:var(--rub-chat-light);scroll-behavior:smooth}
.rub-chat-msg{display:flex;margin-bottom:10px}
.rub-chat-msg-user{justify-content:flex-end}
.rub-chat-bubble{
  max-width:86%;padding:9px 13px;font-size:14px;line-height:1.45;border-radius:14px;word-wrap:break-word;
}
.rub-chat-msg-bot .rub-chat-bubble{background:#fff;color:#1e293b;border-bottom-left-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.rub-chat-msg-user .rub-chat-bubble{background:var(--rub-chat-primary);color:#fff;border-bottom-right-radius:4px}
.rub-chat-bubble a{color:var(--rub-chat-accent);font-weight:600;text-decoration:none}
.rub-chat-bubble a:hover{text-decoration:underline}
.rub-chat-typing{display:flex;gap:4px;padding:12px 14px}
.rub-chat-typing span{width:7px;height:7px;border-radius:50%;background:#94a3b8;animation:rubChatDot 1.2s infinite}
.rub-chat-typing span:nth-child(2){animation-delay:.15s}
.rub-chat-typing span:nth-child(3){animation-delay:.3s}
@keyframes rubChatDot{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-5px);opacity:1}}

.rub-chat-quick-row{display:flex;flex-wrap:wrap;gap:7px;margin:2px 0 12px}
.rub-chat-quick-btn{
  display:inline-block;padding:7px 13px;font-size:13px;font-family:inherit;text-decoration:none;cursor:pointer;
  background:#fff;color:var(--rub-chat-primary);border:1.5px solid var(--rub-chat-primary);border-radius:20px;
  transition:all .2s;
}
.rub-chat-quick-btn:hover{background:var(--rub-chat-primary);color:#fff}
.rub-chat-quick-btn.rub-chat-cta{background:var(--rub-chat-accent);border-color:var(--rub-chat-accent);color:#fff}
.rub-chat-quick-btn.rub-chat-cta:hover{filter:brightness(.92)}

.rub-chat-composer{display:flex;gap:8px;padding:10px;background:#fff;border-top:1px solid #e2e8f0}
.rub-chat-input{
  flex:1;min-width:0;padding:10px 14px;font-size:14px;font-family:inherit;border:1.5px solid #cbd5e1;border-radius:22px;outline:none;
}
.rub-chat-input:focus{border-color:var(--rub-chat-primary)}
.rub-chat-send{
  width:42px;height:42px;border:0;border-radius:50%;background:var(--rub-chat-accent);color:#fff;cursor:pointer;
  display:flex;align-items:center;justify-content:center;flex:none;
}
.rub-chat-send svg{width:18px;height:18px;fill:currentColor}

/* ---------- ENQUIRY FORM ---------- */
.rub-chat-form-wrap{background:#fff;border-radius:12px;padding:14px;margin-bottom:10px;box-shadow:0 1px 4px rgba(0,0,0,.1)}
.rub-chat-form-title{margin:0 0 2px;font-size:16px;font-weight:700;color:var(--rub-chat-primary)}
.rub-chat-form-note{margin:0 0 10px;font-size:12px;color:#64748b}
.rub-chat-field{margin-bottom:10px}
.rub-chat-field label{display:block;font-size:12px;font-weight:600;color:#334155;margin-bottom:3px}
.rub-chat-req{color:#dc2626}
.rub-chat-field input,.rub-chat-field select,.rub-chat-field textarea{
  width:100%;box-sizing:border-box;padding:9px 11px;font-size:14px;font-family:inherit;color:#1e293b;
  border:1.5px solid #cbd5e1;border-radius:8px;outline:none;background:#fff;
}
.rub-chat-field input:focus,.rub-chat-field select:focus,.rub-chat-field textarea:focus{border-color:var(--rub-chat-primary)}
.rub-chat-field.rub-chat-invalid input,.rub-chat-field.rub-chat-invalid select{border-color:#dc2626}
.rub-chat-error{margin:3px 0 0;font-size:12px;color:#dc2626;min-height:0}
.rub-chat-submit{
  width:100%;padding:11px;border:0;border-radius:8px;font-size:15px;font-weight:600;cursor:pointer;color:#fff;
  background:linear-gradient(135deg,var(--rub-chat-primary),var(--rub-chat-primary-dark));
}
.rub-chat-submit:disabled{opacity:.6;cursor:not-allowed}
.rub-chat-honey{position:absolute;left:-9999px;opacity:0;height:0;width:0}

/* ---------- NO HORIZONTAL SCROLL ---------- */
.rub-chat-window,.rub-chat-window *,.rub-chat-bottomnav,.rub-chat-bottomnav *{box-sizing:border-box}
.rub-chat-body{overflow-x:hidden}
.rub-chat-bubble{overflow-wrap:anywhere}
#rubChatTurnstile{max-width:100%;overflow:hidden}

/* ---------- MOBILE BOTTOM NAVBAR ---------- */
.rub-chat-bottomnav{display:none}

@media (max-width:767px){
  html,body{max-width:100%;overflow-x:hidden}
  body{padding-bottom:calc(64px + env(safe-area-inset-bottom,0px))}

  /* hide the right-wall buttons: the navbar replaces them */
  .rub-chat-fab{display:none !important}

  .rub-chat-bottomnav{
    position:fixed !important;left:0 !important;right:0 !important;bottom:0 !important;
    width:100% !important;max-width:100vw;height:auto;
    display:grid !important;grid-template-columns:repeat(4,1fr);
    z-index:2147483000 !important;background:#fff;margin:0;padding:0 0 env(safe-area-inset-bottom,0px);
    border-top:3px solid var(--rub-chat-accent);box-shadow:0 -4px 16px rgba(0,0,0,.15);
  }
  .rub-chat-bottomnav a,.rub-chat-bottomnav button{
    display:flex !important;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    min-width:0;height:60px;margin:0;padding:0 2px;border:0;border-radius:0;background:none;
    font-family:inherit;font-size:11px;font-weight:600;line-height:1.1;white-space:nowrap;
    color:var(--rub-chat-primary);text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .rub-chat-bottomnav svg{display:block !important;width:22px !important;height:22px !important;fill:currentColor;flex:none}
  .rub-chat-bottomnav .rub-chat-nav-wa{color:#128c4a}
  .rub-chat-bottomnav .rub-chat-nav-call{color:#0d6efd}

  .rub-chat-window{
    left:8px;right:8px;top:8px;bottom:calc(72px + env(safe-area-inset-bottom,0px));
    width:auto;max-width:calc(100vw - 16px);height:auto;max-height:none;z-index:2147482999;
  }
  .rub-chat-body{padding:12px 10px}
  .rub-chat-form-wrap{padding:12px 10px}
}