@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

/* RESET / BASE */
*{
    margin:0;
    padding:0;
    /*box-sizing:border-box;*/
    /*font-family:"Poppins",sans-serif;*/
}
body{
    background:#dce1e3;
    width: 100vw;
}

/* WRAPPER-BASED OPEN STATES (replaces .show-chatbot...) */
#gs-chat.is-open .chatbot-toggler { transform: rotate(90deg); }

/* toggle icon swap when open */
#gs-chat.is-open .chatbot-toggler span:first-child,
.chatbot-toggler span:last-child { opacity: 0; }
#gs-chat.is-open .chatbot-toggler span:last-child { opacity: 1; }

/* Show the chatbot on hover of the wrapper or when JS adds .is-open */
#gs-chat:hover .chatbot,
#gs-chat.is-open .chatbot {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* LOGO IN HEADER */
.chatbot-logo {
    width: 70px;
    height: 40px;
    margin-right: 10px;
}
.chatbot-logo span{
    background:white;
    margin-top:20px;
}

/* CHATBOT TOGGLER BUTTON */
.chatbot-toggler{
    position:fixed;
    right:20px;
    bottom:85px;
    height:55px;
    width:55px;
    color:#fff;
    border:none;
    display:flex;
    transition:all 0.2s ease;
    align-items:center;
    justify-content:center;
    outline:none;
    cursor:pointer;
    background:#00224e;
    border-radius:50%;
    z-index: 9999;
}
.chatbot-toggler span{
    position:absolute;
}

/* CHATBOT PANEL */
.chatbot{
    position:fixed;
    right:40px;
    bottom:150px;
    opacity:0;
    height:auto;
    width:420px;
    transform:scale(0.5);
    pointer-events:none;
    background:#f9f2f2;
    overflow:hidden;
    transform-origin:bottom right;
    border-radius: 1.5rem; /* fixed & always rounded */
    box-shadow:0 0 128px rgba(0,0,0,0.1),
               0 32px 64px -48px rgba(0,0,0,0.5);
    transition: all 0.1s ease;
    z-index: 9999;
}

/* HEADER */
.chatbot header{
    background:#00224e;
    padding:20px 10px;
    position:relative;
    display:flex;
    align-items:center;
    gap:10px;
}
.chatbot header .close-btn2{
    position:absolute;
    right:20px;
    top:17%;
    font-size:1.8rem;
    color:#fff;
    cursor:pointer;
    transform:translateY(-50%);
    display:none;
}
.chatbot-logo{
   padding-right:10px;
}
.close-btn1{
    font-size:2.3rem;
}
.chatbot header h2{
    color:#fff;
    font-size:2rem;
    padding-top: 25px;
    padding-left: 11px;
}

/* CHAT AREA */
.chatbot .chatbox{
    max-height:470px;
    overflow-y:auto;
    padding:30px 20px 100px;
}
.chatbot .chat{
    display:flex;
}
.chatbox .incoming span{
    height:32px;
    width:32px;
    color:#fff;
    align-self:flex-end;
    text-align:center;
    border-radius:8px;
    line-height:32px;
    margin: 0px 10px 7px 0;
}
.chatbox .outgoing{
    justify-content:flex-end;
    margin: 20px 0px;
}

/* LOADER (small circle) */
.loader1 {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* GENERIC LOADER (big circle) */
.loader {
    border: 16px solid #f3f3f3;
    border-top: 16px solid #3498db;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

/* SPIN KEYFRAMES (shared) */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* MESSAGE BUBBLES */
.chatbox .chat p{
    color:#fff;
    font-size:0.95rem;
    white-space:pre-wrap;
    padding:12px;
    max-width:75%;
    background:#00224e;
    border-radius: 10px 10px 0 10px;
}
.chatbox .chat p.error{
    color:#721c24;
    background:#f8d7da;
}
.chatbox .incoming p{
    color:#000;
    background:#deecf3;
    border-radius:10px 10px 10px 0;
    display:block;
}

/* INPUT AREA */
.chatbot .chat-input{
    position:absolute;
    bottom:0;
    width:100%;
    display:flex;
    gap: 5px;
    background:#fff;
    padding: 5px 20px;
    border-top:1px solid #ccc;
}
.chat-input textarea{
   outline:none;
   border:none;
   width:100%;
   height:55px;
   max-height:200px;
   padding: 16px 15px 16px 0;
   resize:none;
   font-size:0.95rem;
   overflow: hidden;
}
#char-count {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
    display: absolute;
}
.chat-input button{
  align-self:flex-end;
  height:55px;
  line-height:55px;
  color:#00224e;
  font-size:1.35rem;
  cursor:pointer;
  visibility:hidden;
  border:none;
  background-color: white;
}
.chat-input textarea:valid ~ button{
    visibility:visible;
}

/* CTA BUTTONS */
.schedule-call-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #00224e;
    color: white;
    border: 1px solid #00224e;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}
.schedule-call-btn:hover {
    background-color: #45a049;
}

.inbutton {
    gap:2px;
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    margin:20px;
    font-size: 10px;
    margin-top: 10px;
    padding: 10px 0;
    margin-left: 40px;
}
.inbutton button {
    background-color: #fff;
    color: #00224e;
    border:1px #00224e;
    border-radius: 5px;
    padding: 3px 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    margin: 5px;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.inbutton button:hover {
    background-color: #00224e;
    color: white;
}
.inbutton button:active {
    transform: translateY(1px);
}

/* EMBEDDED FORM */
.form-container {
    position: relative;
    padding: 20px;
    height:450px;
    background-color: #f9f2f2;
    border-top: 1px solid #ccc;
    border-radius:none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-height:600px;
    overflow-y: auto;
}
.form-container form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.form-container label {
    font-weight: bold;
    color: #333;
}
.form-container input {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s;
}
.form-container input:focus {
    border-color: #009fe8;
}
.form-container button {
    background-color:#00224e;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
}
.form-container button:hover {
    background-color: #00224e;
}
.form-close-btn {
    position: absolute;
    background-color: #f9f2f2;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}
.form-close-btn:hover {
    color: red;
}

/* RESPONSIVE */
@media(max-width: 490px)
{
  .chatbot {
    right: 10px;
    bottom: 90px;          /* keep space above the toggle button */
    width: 90%;            /* not full width */
    height: 70vh;          /* only ~70% of viewport height */
    border-radius: 1rem;   /* rounded popup look */
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    background: #f9f2f2;
    overflow: hidden;
  }

  .chatbot header {
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
  }

  .chatbot .chatbox {
    max-height: calc(70vh - 130px); /* space for header + input area */
    overflow-y: auto;
    padding: 20px;
  }

  .chatbot header .close-btn2 {
    display: block;
  }

  .chatbot .chat-input {
    border-radius: 0 0 1rem 1rem;
  }

  .form-container {
    padding: 15px;
  }

  .form-container input,
  .form-container button {
    font-size: 0.9rem;
  }
}



/* SECONDARY CTA */
.schedule-meeting-btn {
    background-color:white;
    color: #00224e;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
    padding-left:20px;
}
.schedule-meeting-btn:hover {
    background-color: #00224e;
    color: white;
}
.schedule-meeting-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
}

/* SCROLLBAR */
.sidebar-container::-webkit-scrollbar {
    width: 5px;
    border-radius: 21px;
    height: 1px;
}
.sidebar-container::-webkit-scrollbar-track {
    background: #18202f !important;
}
.sidebar-container::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: linear-gradient(89.99deg, #3a47ab 0.01%, #4a56db 98.9%) !important;
}
.sidebar-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(89.99deg, #3a47ab 0.01%, #4a56db 98.9%) !important;
}

/* DOT LOADER */
.dots-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}
.dot {
    height: 20px;
    width: 20px;
    margin-right: 10px;
    border-radius: 10px;
    background-color: #b3d4fc;
    animation: pulse 1.5s infinite ease-in-out;
}
.dot:last-child {
    margin-right: 0;
}
.dot:nth-child(1) { animation-delay: -0.3s; }
.dot:nth-child(2) { animation-delay: -0.1s; }
.dot:nth-child(3) { animation-delay: 0.1s; }

/* SEND BUTTON */
#send-btn { position: relative; }

/* DOT PULSE */
@keyframes pulse {
    0% {
      transform: scale(0.8);
      background-color: #b3d4fc;
      box-shadow: 0 0 0 0 rgba(178, 212, 252, 0.7);
    }
    50% {
      transform: scale(1.2);
      background-color: #6793fb;
      box-shadow: 0 0 0 10px rgba(178, 212, 252, 0);
    }
    100% {
      transform: scale(0.8);
      background-color: #b3d4fc;
      box-shadow: 0 0 0 0 rgba(178, 212, 252, 0.7);
    }
}

/* RESET BUTTON IN HEADER */
#reset-btn {
    position: absolute;
    top: 30px;
    right: 10px;
    padding: 8px 16px;
    font-size: 14px;
    margin-top: 21px;
    color: #fff;
    background-color: #00224e;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}
#reset-btn:hover {
    background-color: #003466;
    transform: scale(1.05);
}
#reset-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 34, 78, 0.5);
}

#gs-chat .chatbot { z-index: 10000; }
#gs-chat .chatbot-toggler { z-index: 10002; position: fixed; }
#gs-chat .chatbot header .close-btn2 {
  z-index: 10003;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px)
{

.chatbot-logo
{
	height: 100%;
	width: 25%;
	margin: 0;
}

.chatbot header h2{
	width: 70%;
	padding: 0;
}

#reset-btn
{
	margin: 0;
}

.chatbot-toggler 
{
  right: 40px;
  bottom: 40px;
}

}

ul.chatbox
{
	margin: 0;
}

@media (min-width: 769px)
{
	.chatbot-toggler
	{
		height: 60px;
	}
}
