:root {
  --bg-dark: #0e1a14;
  --bg-mid: #1b3a2b;
  --bg-light: #f1efe7;
  --accent: #f4b860;
  --accent-2: #4fb3a4;
  --text: #0b0b0b;
  --card: rgba(255, 255, 255, 0.9);
  --shadow: 0 22px 60px rgba(14, 26, 20, 0.25);
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none;
}

/* Contact Banner */
.contact-banner {
  background: linear-gradient(135deg, rgba(79, 179, 164, 0.1), rgba(79, 179, 164, 0.05));
  border: 1px solid rgba(79, 179, 164, 0.3);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-banner-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-banner-text strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.contact-banner-text p {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(11, 11, 11, 0.7);
}

.contact-banner-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.contact-banner-form input {
  flex: 1;
  min-width: 150px;
  padding: 0.625rem 0.875rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  background: white;
  transition: all 0.2s;
}

.contact-banner-form input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(79, 179, 164, 0.1);
}

.contact-banner-form button {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: linear-gradient(135deg, var(--accent-2), #3a8a7e);
  color: white;
}

.contact-banner-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 179, 164, 0.3);
}

.contact-banner-form button.dismiss-btn {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  padding: 0.625rem 0.875rem;
  font-size: 1.1rem;
  line-height: 1;
}

.contact-banner-form button.dismiss-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  box-shadow: none;
  transform: none;
}

/* Modal styles */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
  pointer-events: auto;
}

.modal-content {
  background: var(--card);
  padding: 2.5rem;
  border-radius: 16px;
  width: min(480px, 90vw);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
  margin: 0 0 0.75rem 0;
  font-size: 1.75rem;
  color: var(--text);
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-content label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
}

.modal-content input {
  padding: 0.875rem 1rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: white;
  transition: all 0.2s;
}

.modal-content input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(79, 179, 164, 0.1);
}

.modal-content button {
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-mid));
  color: white;
}

.modal-content button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-content button.secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.modal-content button.secondary:hover {
  background: rgba(0, 0, 0, 0.1);
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: var(--bg-light);
  min-height: 100vh;
}

.background {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, #ffffff 0%, transparent 50%),
    radial-gradient(circle at 85% 10%, rgba(244, 184, 96, 0.35) 0%, transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(79, 179, 164, 0.25) 0%, transparent 60%),
    linear-gradient(120deg, #fefbf4 0%, #e4f0e8 100%);
  z-index: -1;
}

.page {
  width: min(960px, 92vw);
  margin: 48px auto 80px;
  display: grid;
  gap: 28px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
}

.title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 0 0 8px;
}

.subtitle {
  margin: 0;
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.6);
}

.brand {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-mid));
  color: white;
  padding: 18px 24px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  min-width: 140px;
  text-align: center;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.logo-img {
  height: 60px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
}

.info {
  background: var(--card);
  padding: 24px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.welcome {
  margin: 0;
  font-size: 1.05rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  background: rgba(79, 179, 164, 0.15);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.chat {
  background: var(--card);
  padding: 24px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

select {
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.95rem;
  background: white;
}

.messages {
  min-height: 280px;
  max-height: 380px;
  overflow-y: auto;
  display: grid;
  gap: 12px;
  padding-right: 6px;
}

.message {
  padding: 12px 14px;
  border-radius: 12px;
  line-height: 1.4;
  font-size: 0.95rem;
}

.message.user {
  background: rgba(244, 184, 96, 0.2);
  justify-self: end;
}

.message.assistant {
  background: rgba(15, 25, 20, 0.08);
  justify-self: start;
}

.message.doctor {
  background: rgba(41, 123, 86, 0.15);
  justify-self: start;
  border-left: 3px solid #297B56;
}

.composer {
  display: flex;
  gap: 12px;
}

.rating {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(79, 179, 164, 0.12);
}

.rating-buttons {
  display: flex;
  gap: 8px;
}

.rating button {
  padding: 6px 10px;
  font-size: 0.85rem;
  background: white;
  color: var(--text);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

input[type="text"] {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  font-size: 1rem;
}

button {
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  background: var(--bg-dark);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 25, 20, 0.2);
}

.disclaimer {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.55);
  margin: 0;
}

/* Payment Modal */
.payment-modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.payment-modal-content {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.payment-modal-content h2 {
  margin: 0 0 0.5rem 0;
  color: var(--bg-dark);
}

.payment-modal-content p {
  margin: 0 0 1.5rem 0;
  color: #666;
}

#card-element {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 1rem;
  background: white;
}

#card-errors {
  color: #dc3545;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.payment-submit-btn, .payment-cancel-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 0.5rem;
}

.payment-submit-btn {
  background: linear-gradient(135deg, #4fb3a4, #3a8a7e);
  color: white;
}

.payment-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 179, 164, 0.3);
}

.payment-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.payment-cancel-btn {
  background: #f0f0f0;
  color: #333;
}

.payment-cancel-btn:hover {
  background: #e0e0e0;
}

/* Pricing banner */
.pricing-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(244, 184, 96, 0.12), rgba(79, 179, 164, 0.10));
  border: 1px solid rgba(244, 184, 96, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.92rem;
  color: var(--text);
}

.pricing-icon {
  font-size: 1.2rem;
  color: var(--accent);
}

@media (max-width: 700px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand {
    width: 100%;
  }

  .composer {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .payment-modal-content {
    padding: 1.5rem;
  }
}
