/* Floating Chat Widget */
.wp-chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Chat Button */
.wp-chat-widget__button {
  padding: 15px 30px !important;
  border-radius: 50px ;
  background: #6F1423;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}
.wp-chat-widget__button h5 {
  color: #fff;
}
.wp-chat-widget__button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.wp-chat-widget__button svg {
  width: 28px;
  height: 28px;
}

/* Chat Window */
.wp-chat-widget__window {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 400px;
  max-width: calc(100vw - 40px);
  height: 650px;
  max-height: calc(100vh - 100px);
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.wp-chat-widget__header {
  background: #6F1423;
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wp-chat-widget__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px !important;
}

.wp-chat-widget__logo {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: contain;
  background: white;
  padding: 2px;
}

.wp-chat-widget__header-actions {
  display: flex;
  gap: 8px;
}

.wp-chat-widget__refresh,
.wp-chat-widget__close {
  background: transparent;
  border: none;
  color: white !important;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.wp-chat-widget__refresh:hover,
.wp-chat-widget__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Messages Area */
.wp-chat-widget__messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f7f7f7;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wp-chat-widget__messages::-webkit-scrollbar {
  width: 6px;
}

.wp-chat-widget__messages::-webkit-scrollbar-track {
  background: transparent;
}

.wp-chat-widget__messages::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.wp-chat-widget__messages::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Welcome Section */
.wp-chat-widget__welcome {
  text-align: center;
  padding: 20px;
}

.wp-chat-widget__welcome-title {
  font-size: 24px !important;
  font-weight: 700;
  color: #000;
  margin-bottom: 16px;
}

.wp-chat-widget__welcome p {
  color: #000;
  line-height: 1.6;
  margin-bottom: 24px;
}

.wp-chat-widget__suggestions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wp-chat-widget__suggestion {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px !important;
  color: #DEC97A;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.wp-chat-widget__suggestion:hover {
  background: #f8f9ff;
  border-color: #DEC97A;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

/* Message Bubbles */
.wp-chat-widget__message {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  line-height: 1.5;
  word-wrap: break-word;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wp-chat-widget__message--bot {
  background: white;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Markdown formatting in bot messages */
.wp-chat-widget__message--bot h1 {
  font-size: 20px !important;
  font-weight: 700;
  margin: 12px 0 8px 0;
  color: #000;
  line-height: 1.3;
}

.wp-chat-widget__message--bot h2 {
  font-size: 18px !important;
  font-weight: 600;
  margin: 10px 0 6px 0;
  color: #000;
  line-height: 1.3;
}

.wp-chat-widget__message--bot h3 {
  font-size: 16px !important;
  font-weight: 600;
  margin: 8px 0 4px 0;
  color: #333;
  line-height: 1.3;
}

.wp-chat-widget__message--bot ul {
  margin: 8px 0;
  padding-left: 20px;
  list-style-type: disc;
}

.wp-chat-widget__message--bot li {
  margin: 4px 0;
  line-height: 1.5;
}

.wp-chat-widget__message--bot strong {
  font-weight: 600;
  color: #000;
}

.wp-chat-widget__message--bot em {
  font-style: italic;
}

.wp-chat-widget__message--bot p {
  margin: 6px 0;
  line-height: 1.6;
}

.wp-chat-widget__message--bot p:first-child {
  margin-top: 0;
}

.wp-chat-widget__message--bot p:last-child {
  margin-bottom: 0;
}

.wp-chat-widget__message--user {
  background: #6F1423;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.wp-chat-widget__typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: white;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.wp-chat-widget__typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000;
  animation: typing 1.4s infinite;
}

.wp-chat-widget__typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.wp-chat-widget__typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }

  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Footer Section */
.wp-chat-widget__footer {
  background: white;
  border-top: 1px solid #e5e5e5;
}

.wp-chat-widget__contact-trigger {
  width: 100%;
  padding: 12px 16px;
  background: #f0f4ff;
  border: none;
  border-bottom: 1px solid #e5e5e5;
  color: #DEC97A;
  font-size: 13px !important;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}

.wp-chat-widget__contact-trigger:hover {
  background: #e6edff;
}

.wp-chat-widget__disclaimer {
  padding: 8px 16px;
  font-size: 11px !important;
  /* color: #999;*/
    color: #000;
  text-align: center;
  border-bottom: 1px solid #e5e5e5;
}

/* Input Area */
.wp-chat-widget__input {
  display: flex;
  gap: 8px;
  padding: 16px;
}

.wp-chat-widget__text {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px !important;
  outline: none;
  transition: border-color 0.2s;
}

.wp-chat-widget__text:focus {
  border-color: #DEC97A;
}

.wp-chat-widget__send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #6F1423;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.2s;
  padding: 0;
  overflow: hidden;
}

.wp-chat-widget__send img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.wp-chat-widget__send:hover:not(:disabled) {
  transform: scale(1.05);
}

.wp-chat-widget__send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Contact Form */
.wp-chat-widget__contact-form {
  padding: 16px;
}

.wp-chat-widget__validation {
  display: none;
  padding: 10px 14px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  color: #856404;
  font-size: 13px !important;
  margin-bottom: 12px;
  text-align: center;
  animation: slideIn 0.3s ease;
}

.wp-chat-widget__contact-title {
  font-size: 15px !important;
  font-weight: 600;
  color: #000;
  margin-bottom: 8px;
}

.wp-chat-widget__contact-subtitle {
  font-size: 13px !important;
  color: #666;
  margin-bottom: 16px;
}

.wp-chat-widget__contact-name,
.wp-chat-widget__contact-email {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px !important;
  margin-bottom: 10px;
  outline: none;
  transition: border-color 0.2s;
}

.wp-chat-widget__contact-name:focus,
.wp-chat-widget__contact-email:focus {
  border-color: #DEC97A;
}

.wp-chat-widget__contact-submit,
.wp-chat-widget__contact-cancel {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 14px !important;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.wp-chat-widget__contact-submit {
  background: #6F1423;
  color: white !important;
}

.wp-chat-widget__contact-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wp-chat-widget__contact-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.wp-chat-widget__contact-cancel {
  background: #f5f5f5;
  color: #666;
}

.wp-chat-widget__contact-cancel:hover {
  background: #e5e5e5;
}

/* Powered By */
.wp-chat-widget__powered {
  padding: 8px 16px;
  font-size: 14px !important;
  color: #000;
  text-align: center;
  background: #fafafa;
}

.wp-chat-widget__powered a{
  /* background-image: linear-gradient(to right, #1c39bb,#264eff,#5977ff) !important; */
  color: #1c39bb;
  text-decoration: none;
  font-weight: 500;
}

.wp-chat-widget__powered a:hover {
  text-decoration: underline;
  color: #264eff;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .wp-chat-widget {
    bottom: 10px;
    right: 10px;
  }

  .wp-chat-widget__window {
    width: calc(100vw - 20px);
    height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
  }

  .wp-chat-widget__button {
    width: 56px;
    height: 56px;
  }
}