:root {
  --blue:#0b3c6d;
  --blue-dark:#083056;
  --panel:#f8fafc;
  --border:#e5e7eb;
  --text:#111827;
  --muted:#6b7280;
  --radius:12px;
}

/* open */
.chat-open-btn{ 
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #003366;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 12px 32px rgba(11, 60, 109, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 5px;
    border: 4px solid white;
}
@media screen and (min-width:1000px){
  .chat-open-btn { 
    right: 120px;
    bottom: 90px;
  }
}
.chat-open-btn svg{width:38px;height:38;fill:#fff}
.chat-open-btn:hover{ 
    transition:0.1s all;
    bottom: 92px;
}
/* widget */
.chat-widget{
  position:fixed;
  right:28px;
  bottom:28px;
  width:400px;
  height:600px;
  background:#fff;
  border-radius:var(--radius);
  box-shadow:0 20px 50px rgba(0,0,0,.18);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  z-index:1001;
}
.chat-widget.closed{display:none}

/* header */
.chat-header{
  display:flex;
  gap:14px;
  padding:16px;
  background:linear-gradient(180deg,#f9fbfd,var(--panel));
  border-bottom:1px solid var(--border);
  align-items:center;
}
.chat-logo img{height:30px}
.chat-title{
  font-weight:600;
  color:var(--blue);
  line-height:1.2;
}
.chat-subtitle{
  display:block;
  font-size:12px;
  color:var(--muted);
}

/* close */
.chat-close-btn{
  position:absolute;
  top:8px;right:8px;
  background:none;
  border:none;
  font-size:26px;
  color:var(--muted);
  cursor:pointer;
}
.chat-close-btn:hover{color:var(--blue)}

/* messages */
.chat-messages{
  flex:1;
  padding:16px;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:14px;
}

/* bubbles */
.msg-row{display:flex}
.msg-bot{justify-content:flex-start}
.msg-user{justify-content:flex-end}

.msg-bubble{
  max-width:78%;
  padding:13px 16px;
  border-radius:var(--radius);
  font-size:15px;
  line-height:1.45;
}
.msg-bot .msg-bubble{
  background:#f1f5f9;
  border:1px solid var(--border);
  color:var(--text);
}
.msg-user .msg-bubble{
  background:linear-gradient(135deg,var(--blue),#0e4b87);
  color:#fff;
}

/* options */
.chat-options{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.option-btn{
  background:#fff;
  border:1.5px solid var(--border);
  border-radius:var(--radius);
  padding:12px 16px;
  font-size:15px;
  text-align:left;
  cursor:pointer;
}
.option-btn:hover{
  border-color:var(--blue);
  background:#f9fbfd;
}

/* footer */
.chat-footer{
  border-top:1px solid var(--border);
  background:var(--panel);
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.chat-nav{
  display:flex;
  justify-content:space-between;
}
.back-btn{
  background:#eef2f7;
  border:1px solid var(--border);
  padding:8px 12px;
  border-radius:var(--radius);
  cursor:pointer;
}
.restart-btn{
  background:none;
  border:none;
  color:var(--blue);
  cursor:pointer;
}

/* input */
.chat-input-area{
  display:flex;
  gap:8px;
}
.chat-input{
  flex:1;
  padding:10px 14px;
  border-radius:var(--radius);
  border:1.5px solid var(--border);
  font-size:15px;
}
.chat-input:focus{
  outline:none;
  border-color:var(--blue);
}
.chat-send-btn{
  background:var(--blue);
  color:#fff;
  border:none;
  padding:10px 18px;
  border-radius:var(--radius);
  font-weight:600;
  cursor:pointer;
}
.chat-send-btn:disabled{
  background:#b6c6da;
}

/* mobile */
@media(max-width:600px){
  .chat-widget{
    right:0;bottom:0;
    width:100vw;height:100dvh;
    border-radius:0;
  }
}

