:root {
  --chatbot-primary: #592AAB
}

#chatbox-container {
  font-family: sans-serif
}

#chatbox-icon {
  position: fixed;
  bottom: 20px;
  right: 10px;
  width: 120px;
  height: 107px;
  cursor: pointer;
  z-index: 9999
}

#chatbox-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 80vw;
  max-width: 360px;
  max-height: 45vh;
  display: flex;
  flex-direction: column;
  background-color: var(--chatbot-primary);
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  overflow: auto;
  z-index: 10000;
  animation: fadeInUp 0.3s ease
}

#chatbox-window::-webkit-scrollbar {
  display: none
}

@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0
  }

  to {
    transform: translateY(0);
    opacity: 1
  }
}

#chatbox-window .welcome-page {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center
}

#chatbox-window h3 {
  font-size: 2rem;
  line-height: 1.5;
  font-weight: 600;
  font-family: sans-serif;
  color: #fff;
  margin: 2rem 0 1.5rem
}

#chatbox-window p {
  font-size: 1rem;
  margin: 0 0 30px
}

#chatbox-window .card-container {
  padding: 20px 16px;
  border-radius: 10px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .08);
  background-color: #fff;
  color: #545454;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  cursor: pointer
}

#chatbox-window .card-container .content {
  display: flex;
  flex-direction: column
}

#chatbox-window .card-container p {
  margin: 0
}

#chatbox-window .card-container .send-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background-color: #e7e7e7;
  display: flex;
  align-items: center;
  justify-content: center
}

#chatbox-window .back-page-box {
  padding: 10px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background-color: var(--chatbot-primary);
  z-index: 2;
}

#chatbox-window .back-page-box button {
  background: transparent;
  border: 0;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  line-height: 0;
  transition: 0.2s all ease-in-out
}

#chatbox-window .back-page-box button:hover {
  background: rgba(255, 255, 255, 0.15)
}

#chatbox-user-details-form {
  padding: 12px 20px;
  text-align: center
}

#chatbox-user-details-form .form-otp {
  background-color: white;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 18px
}

#formOtp .chatbox-error-message {
  display: none;
  color: #dc3545;
  font-size: 12px;
  text-align: left;
  margin-bottom: 6px;
}

#chatbox-user-details-form input {
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid #ddd;
  background-color: transparent;
  transition: 0.2s all ease-in-out
}

#chatbox-user-details-form input:-webkit-autofill,
#chatbox-user-details-form input:-webkit-autofill:hover,
#chatbox-user-details-form input:-webkit-autofill:focus,
#chatbox-user-details-form input:-webkit-autofill:active {
  -webkit-transition-delay: 9999s;
  transition-delay: 9999s
}

#chatbox-user-details-form input:focus {
  outline: none;
  border-bottom: 1px solid var(--chatbot-primary)
}

#formOtp .input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#formOtp .field-error-message {
  display: none;
  color: #dc3545;
  font-size: 12px;
  text-align: left;
}

#formOtp .field-error-message:not(:empty) {
  display: block;
}

#formOtp .input-group input.input-error {
  border-bottom-color: #dc3545;
}


#chatbox-user-details-form #formOtp button {
  background-color: var(--chatbot-primary);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 100rem;
  cursor: pointer;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-left: 30px;
  transition: 0.4s all ease-in-out
}

#chatbox-user-details-form #OtpVerify h3 {
  margin-top: 0
}

#chatbox-user-details-form #OtpVerify input {
  padding-right: 64px
}

#chatbox-user-details-form #OtpVerify .verify-otp-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px
}

#chatbox-user-details-form #OtpVerify .verify-otp-box {
  position: relative
}

#chatbox-user-details-form .chatbox-otp-error-message {
  display: none;
  color: #dc3545;
  font-size: 12px;
  margin: 6px 0 0;
  text-align: left;
  min-height: 18px;
}

#chatbox-user-details-form .chatbox-otp-error-message:not(:empty) {
  display: block;
}

#chatbox-user-details-form #OtpVerify #chatbox-verify-otp-btn {
  background-color: var(--chatbot-primary);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 100rem;
  cursor: pointer;
  margin-top: 10px
}

#chatbox-user-details-form #OtpVerify #chatbox-verify-otp-btn:disabled {
  opacity: 0.8;
  cursor: no-drop
}

#chatbox-user-details-form #formOtp #chatbox-send-otp-btn:disabled {
  opacity: 0.8;
  cursor: no-drop
}

#chatbox-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background-color: #f8f9fa;
  font-size: 14px;
  scrollbar-width: thin;
  max-height: 30.7vh
}

#chatbox-input-area {
  display: flex;
  border-top: 1px solid #e0e0e0;
  padding: 10px;
  background: #fff;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

#chatbox-user-input {
  flex: 1;
  resize: none;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  background: #f1f3f5;
  outline: none;
  max-height: 100px;
  overflow-y: auto
}

#chatbox-send-btn {
  background-color: var(--chatbot-primary);
  color: #fff;
  border: none;
  margin-left: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s
}

#chatbox-send-btn:hover {
  background-color: #0a58ca
}

.user-msg {
  color: #FFF;
  border-radius: 12px 12px 0 12px;
  margin-bottom: 10px;
  max-width: 80%;
  align-self: flex-end;
  margin-left: auto;
  background-color: var(--chatbot-primary)
}

.ai-msg {
  color: #212529;
  border-radius: 12px 12px 12px 0;
  margin-bottom: 10px;
  max-width: 80%;
  background: #e5e5ea;
  align-self: flex-start;
  margin-right: auto
}

.ai-msg.error {
  background-color: #f8d7da;
  color: #842029
}

.hidden {
  display: none !important
}

.ai-msg.typing {
  font-style: italic;
  color: #888;
  display: inline-block;
  padding: 4px 8px;
  min-width: 60px;
}

.ai-msg.typing::after {
  content: ' .';
  animation: dots 1.5s steps(3, end) infinite
}

@keyframes dots {
  0% {
    content: ' .'
  }

  33% {
    content: ' ..'
  }

  66% {
    content: ' ...'
  }

  100% {
    content: ' .'
  }
}

.chatbox-confirm-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
  pointer-events: auto;
}

.chatbox-confirm-overlay.hidden {
  display: none;
}
.chatbox-confirm-modal {
  width: 100%;
  max-width: 360px;
  background-color: #ffffff;
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.chatbox-confirm-message {
  margin-bottom: 20px;
  color: #202124;
  font-size: 15px;
  line-height: 1.5;
}

.chatbox-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.chatbox-confirm-btn {
  flex: 1;
  min-width: 110px;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.chatbox-confirm-btn:hover {
  transform: translateY(-1px);
}

.chatbox-confirm-btn.confirm {
  background-color: var(--chatbot-primary);
  color: #fff;
}

.chatbox-confirm-btn.cancel {
  background-color: #f1f3f5;
  color: #202124;
}

/* ===== Button Loader Spinner ===== */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.chatbox-loader {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

#chatbox-send-otp-btn.btn-loading,
#chatbox-verify-otp-btn.btn-loading {
  opacity: 0.9;
  pointer-events: none;
}

#chatbox-chat-area {
  display: flex;
  flex-direction: column;
  height: 100%
}

.chatbox-error-message {
  color: red;
  font-size: 13px;
  margin-top: 5px
}

.chatbox-success-message {
  color: greenyellow;
  font-size: 13px;
  margin-top: 5px
}

.text-align {
  text-align: left
}

#chatbox-container .intl-tel-input .country-list {
  color: #212529;
  font-size: 12px
}

.intl-tel-input input,
.intl-tel-input input[type=text],
.intl-tel-input input[type=tel] {
  padding-right: 6px !important;
  padding-left: 52px !important
}

#chatbox-icon .spin-stroke {
  transform-origin: 60px 66px;
  animation: spin 2s linear infinite
}

@keyframes spin {
  0% {
    transform: rotate(0deg)
  }

  100% {
    transform: rotate(360deg)
  }
}

#LoadPreviousChat {
  display: inline-block;
  padding: 10px 16px;
  margin: 10px auto;
  background-color: var(--chatbot-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: background 0.25s ease, transform 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15)
}

#LoadPreviousChat:hover {
  background: linear-gradient(135deg, var(--chatbot-primary), #5a349b);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2)
}

#LoadPreviousChat:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15)
}

#LoadPreviousChat:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.4)
}

.day-group {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center
}

.day-label {
  position: relative;
  font-size: 12px;
  font-weight: 500;
  color: #592AAB;
  background: #f6f1ff;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08)
}

.day-label::before,
.day-label::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 50px;
  height: 1px;
  background: #ddd
}

.day-label::before {
  right: 100%;
  margin-right: 8px
}

.day-label::after {
  left: 100%;
  margin-left: 8px
}

.chat-msg {
  position: relative;
  display: inline-block;
  max-width: 80%;
  margin: 4px 0
}

.chat-msg .msg-text {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 12px;
  position: relative;
  z-index: 1;
  word-break: break-word;
}

.chat-msg .chat-tooltip {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s
}

.chat-msg:hover .chat-tooltip {
  opacity: 1
}

.user-msg .chat-tooltip {
  right: 100%;
  margin-right: 6px;
  text-align: right
}

.ai-msg .chat-tooltip {
  left: 100%;
  margin-left: 6px;
  text-align: left
}

.svg_star_number {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.resend-otp-box p {
  margin-bottom: 0 !important;
  color: darkgray;
  font-size: 14px !important;
}

.resend-otp-box button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

.resend-otp-box button:not(:disabled) {
  color: var(--chatbot-primary);
}

.edit-mobile {
  padding: 0;
  border: none;
  background: transparent;
  color: white;
  font-size: 18px;
  margin-bottom: 4px;
  margin-left: 6px;
  display: flex;
  cursor: pointer;
}

/* intl-tel-input */
.iti--separate-dial-code .iti__selected-flag {
  background: none !important;
}

.iti--separate-dial-code .iti__selected-dial-code,
.iti__country {
  color: #000;
  font-size: 12px;
}

.iti-mobile .iti--container {
  z-index: 10000 !important;
}

@media (min-width: 768px) {
    .iti__country-list {
      z-index: 1 !important;
      max-height: 100px !important;
    }
}

@media (max-width: 500px) {
    .iti__country-list {
        white-space: nowrap !important;
    }
}
/* intl-tel-input */