/* WhatsApp Sign-up Component Styles */

/* === SHARED FORM STYLES === */

.wa-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-purple);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.wa-input,
.wa-select {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border-light);
  border-radius: 10px;
  background: var(--white);
  color: var(--text-dark);
  font-size: 15px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.wa-input:focus,
.wa-select:focus {
  outline: none;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.12);
}

.wa-input.wa-error,
.wa-select.wa-error {
  border-color: #e74c3c;
}

.wa-error-msg {
  color: #e74c3c;
  font-size: 11px;
  margin-top: 4px;
  display: none;
}

.wa-error-msg.visible {
  display: block;
}

.wa-field {
  margin-bottom: 12px;
}

/* Phone group */
.wa-phone-group {
  display: flex;
  gap: 8px;
}

.wa-ddi-select {
  width: 100px;
  flex-shrink: 0;
  padding: 11px 8px;
  border: 2px solid var(--border-light);
  border-radius: 10px;
  background: var(--white);
  color: var(--text-dark);
  font-size: 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  transition: border-color 0.2s;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.wa-ddi-select:focus {
  outline: none;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.12);
}

.wa-phone-input {
  flex: 1;
}

/* Frequency pills */
.wa-freq-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.wa-freq-pill {
  position: relative;
}

.wa-freq-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.wa-freq-pill label {
  display: inline-block;
  padding: 7px 13px;
  border: 2px solid var(--border-light);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  white-space: nowrap;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.wa-freq-pill input[type="radio"]:checked + label {
  background: var(--primary-orange);
  border-color: var(--primary-orange);
  color: #fff;
  font-weight: 600;
}

.wa-freq-pill label:hover {
  border-color: var(--primary-orange);
  color: var(--primary-orange);
}

/* Privacy text */
.wa-privacy {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 14px;
  padding: 9px 11px;
  background: var(--background-light);
  border-radius: 8px;
}

/* CTA button */
.wa-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.wa-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

.wa-cta-btn:active {
  transform: translateY(0);
}

/* === HOMEPAGE SECTION === */

.wa-section {
  background: linear-gradient(135deg, #f5f0ff 0%, #fff8f0 100%);
  padding: 48px 24px;
  border-top: 1px solid var(--border-light);
}

.wa-section-inner {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.wa-section-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #25D366;
}

.wa-section-headline {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--primary-purple);
  margin-bottom: 8px;
  line-height: 1.25;
}

.wa-section-sub {
  font-size: 0.93rem;
  color: var(--text-light);
  margin-bottom: 24px;
  line-height: 1.5;
}

.wa-section .wa-form-wrapper {
  text-align: left;
}

/* === POPUP COMPONENT === */

.wa-toggle-wrapper {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  z-index: 1001;
}

.wa-toggle-label {
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 20px;
  white-space: nowrap;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0.2px;
  pointer-events: none;
}

.wa-toggle-btn {
  width: 52px;
  height: 52px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-toggle-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
}

.wa-toggle-btn .wa-toggle-icon {
  transition: transform 0.2s ease;
}

.wa-popup-card {
  position: fixed;
  bottom: 116px;
  right: 22px;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--white, #fff);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border-light, #e5e5e5);
  z-index: 1000;
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.wa-popup-card.wa-popup-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.wa-popup-header {
  padding: 14px 14px 11px;
  border-bottom: 1px solid var(--border-light, #e5e5e5);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.wa-popup-titles {
  flex: 1;
}

.wa-popup-headline {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-purple, #5A3F84);
  line-height: 1.3;
  margin-bottom: 2px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.wa-popup-sub {
  font-size: 0.77rem;
  color: var(--text-light, #666);
  line-height: 1.4;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.wa-popup-close {
  background: var(--background-light, #fafafa);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  min-width: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-light, #666);
  transition: background 0.2s;
  margin-top: 1px;
}

.wa-popup-close:hover {
  background: var(--border-light, #e5e5e5);
}

.wa-popup-body {
  padding: 13px 14px 14px;
}

/* Mobile */
@media (max-width: 480px) {
  .wa-toggle-wrapper {
    bottom: 16px;
    right: 16px;
  }

  .wa-toggle-btn {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .wa-popup-card {
    bottom: 106px;
    right: 8px;
    left: 8px;
    width: auto;
    max-width: calc(100vw - 16px);
  }

  .wa-input,
  .wa-select,
  .wa-ddi-select {
    font-size: 16px; /* prevents iOS zoom */
  }

  .wa-section {
    padding: 36px 16px;
  }

  .wa-section-headline {
    font-size: 1.4rem;
  }
}
