* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: transparent; /* <-- Transparent lets the WordPress white show through perfectly */
  color: #1f2937;
}

body {
  padding: 12px;
}

.chat-widget {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 88vh;
}

.chat-header {
  background: #25306e;
  color: #ffffff;
  padding: 18px 16px;
}

.header-text h1 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

.header-text p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  opacity: 0.95;
}

.chat-messages {
  flex: 1;
  min-height: 320px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 14px;
  background: #f8f9fc;
}

.message {
  display: flex;
  margin-bottom: 12px;
}

.message.user {
  justify-content: flex-end;
}

.message.assistant {
  justify-content: flex-start;
}

.bubble {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.96rem;
  line-height: 1.45;
  word-wrap: break-word;
}

.message.user .bubble {
  background: #25306e;
  color: #ffffff;
  border-bottom-right-radius: 6px;
}

.message.assistant .bubble {
  background: #e9eefb;
  color: #1f2937;
  border-bottom-left-radius: 6px;
}

.bubble strong {
  font-weight: 700;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}

.chip {
  border: 1px solid #d4d8e3;
  background: #ffffff;
  color: #25306e;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  background: #f1f5ff;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

#chatInput {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 0.96rem;
  outline: none;
}

#chatInput:focus {
  border-color: #25306e;
}

.send-button {
  border: none;
  background: #25306e;
  color: #ffffff;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.cta-section {
  padding: 14px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.primary-cta {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 16px 18px;
  background: #ff9900;
  color: #000000;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.primary-cta:hover {
  opacity: 0.96;
}

.primary-cta:active {
  transform: scale(0.99);
}

.cta-subtext {
  text-align: center;
  font-size: 0.82rem;
  color: #6b7280;
  margin-top: 8px;
}

.profile-card {
  margin: 12px 14px 0;
  background: #fff7e8;
  border: 1px solid #ffd18a;
  border-radius: 14px;
  padding: 14px;
}

.profile-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #1f2937;
}

.profile-card p {
  margin: 6px 0;
  font-size: 0.92rem;
  color: #374151;
}

.mini-cta {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
  background: #ff9900;
  color: #000000;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.58);
  padding: 16px;
}

.modal-content {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  margin: 10vh auto 0;
  padding: 24px 18px 18px;
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  position: relative;
  text-align: center;
}

.modal-content h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  color: #111827;
}

.modal-content p {
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 0.95rem;
}

.modal-content input {
  width: 100%;
  padding: 13px 14px;
  margin: 9px 0;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.96rem;
}

.modal-content input:focus {
  outline: none;
  border-color: #25306e;
}

.submit-lead-button {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 10px;
  background: #ff9900;
  color: #000000;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

/* Updated to style both the original close-modal and new close buttons */
.close-modal, .close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}

.close-modal:hover, .close:hover {
  color: #111827;
}

/* ========================================== */
/* NEW: DISCLAIMER SPECIFIC STYLES            */
/* ========================================== */
.disclaimer-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
  display: block;
  margin: 15px auto 5px auto;
  text-align: center;
  font-family: inherit;
}

.disclaimer-btn:hover {
  color: #555;
}

.disclaimer-content {
  max-height: 85vh; 
  overflow-y: auto; 
}

.disclaimer-text {
  font-size: 12px;
  line-height: 1.6;
  color: #444;
  margin-top: 15px;
  text-align: left;
}

.disclaimer-text p {
  margin-bottom: 12px;
}

.disclaimer-text a {
  color: #25306e;
  text-decoration: none;
}

.disclaimer-text a:hover {
  text-decoration: underline;
}

/* MOBILE OPTIMIZATION */
@media (max-width: 768px) {
  body {
    padding: 0;
    background: #ffffff;
  }

  .chat-widget {
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .chat-header {
    padding: 16px 14px;
  }

  .header-text h1 {
    font-size: 1.1rem;
  }

  .header-text p {
    font-size: 0.82rem;
  }

  .chat-messages {
    max-height: none;
    min-height: 40vh;
    padding: 12px;
  }

  .bubble {
    max-width: 92%;
    font-size: 0.95rem;
    padding: 11px 13px;
  }

  .quick-chips {
    gap: 7px;
    padding: 10px 12px;
  }

  .chip {
    font-size: 0.82rem;
    padding: 8px 11px;
  }

  .chat-input-row {
    padding: 10px 12px;
    gap: 8px;
  }

  #chatInput {
    font-size: 16px;
    padding: 12px;
  }

  .send-button {
    padding: 12px 14px;
    font-size: 0.92rem;
  }

  .cta-section {
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .primary-cta {
    font-size: 1rem;
    padding: 16px;
    border-radius: 14px;
  }

  .cta-subtext {
    font-size: 0.8rem;
  }

  .profile-card {
    margin: 10px 12px 0;
    padding: 12px;
  }

  .modal {
    padding: 12px;
  }

  .modal-content {
    width: 100%;
    margin: 8vh auto 0;
    padding: 22px 16px 16px;
    border-radius: 14px;
  }

  .modal-content input {
    font-size: 16px;
  }

  .submit-lead-button {
    font-size: 1rem;
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .header-text h1 {
    font-size: 1rem;
  }

  .header-text p {
    font-size: 0.78rem;
  }

  .chip {
    font-size: 0.8rem;
  }

  .bubble {
    font-size: 0.93rem;
  }

  .primary-cta {
    font-size: 0.98rem;
  }
}
