/* ============================================================
   IWACA Application Form & WhatsApp Integration Styles
   Palette: Ivory, Champagne, Warm Gold, IWACA Emerald & Graphite
   ============================================================ */

:root {
  --iwaca-gold: #C5A059;
  --iwaca-gold-hover: #b38e47;
  --iwaca-gold-light: rgba(197, 160, 89, 0.12);
  --iwaca-gold-border: rgba(197, 160, 89, 0.38);
  --iwaca-green: #1f6e43;
  --iwaca-green-hover: #175433;
  --iwaca-whatsapp: #25D366;
  --iwaca-whatsapp-dark: #128C7E;
  --iwaca-ivory: #FAF8F5;
  --iwaca-champagne: #F3EFEA;
  --iwaca-graphite: #222222;
  --iwaca-text-muted: #666666;
  --iwaca-border-color: #E2DBD2;
  --iwaca-card-bg: #FFFFFF;
  --iwaca-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.07), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
}

/* Base Form Container */
.iwaca-form-wrapper {
  background: var(--iwaca-ivory);
  border: 1px solid var(--iwaca-gold-border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: var(--iwaca-shadow);
  color: var(--iwaca-graphite);
  font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.iwaca-form-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--iwaca-gold) 0%, #E6C875 50%, var(--iwaca-green) 100%);
}

.iwaca-form-header {
  margin-bottom: 24px;
  text-align: left;
}

.iwaca-form-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--iwaca-gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.iwaca-form-title {
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 8px 0;
  font-weight: 600;
  color: var(--iwaca-graphite);
  letter-spacing: -0.3px;
}

.iwaca-form-subtitle {
  font-size: 15px;
  line-height: 1.5;
  color: var(--iwaca-text-muted);
  margin: 0;
}

/* Form Fields Layout */
.iwaca-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.iwaca-field-full {
  grid-column: 1 / -1;
}

.iwaca-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.iwaca-field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--iwaca-graphite);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.iwaca-field-label .required {
  color: #D32F2F;
  margin-left: 3px;
}

.iwaca-input,
.iwaca-textarea,
.iwaca-select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--iwaca-graphite);
  background-color: #FFFFFF;
  border: 1px solid var(--iwaca-border-color);
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.iwaca-input:focus,
.iwaca-textarea:focus,
.iwaca-select:focus {
  outline: none;
  border-color: var(--iwaca-gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.18);
}

.iwaca-textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.45;
}

/* Interest Radio Chips (What are you interested in?) */
.iwaca-interest-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--iwaca-graphite);
  margin-bottom: 8px;
  display: block;
}

.iwaca-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.iwaca-chip {
  position: relative;
  display: inline-flex;
}

.iwaca-chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.iwaca-chip label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 450;
  background: #FFFFFF;
  border: 1px solid var(--iwaca-border-color);
  border-radius: 30px;
  cursor: pointer;
  color: #444444;
  transition: all 0.2s ease;
  user-select: none;
}

.iwaca-chip label:hover {
  border-color: var(--iwaca-gold);
  background: var(--iwaca-gold-light);
  color: var(--iwaca-graphite);
}

.iwaca-chip input[type="radio"]:checked + label {
  background: var(--iwaca-green);
  border-color: var(--iwaca-green);
  color: #FFFFFF;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(31, 110, 67, 0.25);
}

/* Submit Actions */
.iwaca-form-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.iwaca-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #1f6e43 0%, #155533 100%);
  color: #FFFFFF !important;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(31, 110, 67, 0.3);
}

.iwaca-btn-submit:hover {
  background: linear-gradient(135deg, #237d4c 0%, #175a36 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(31, 110, 67, 0.4);
}

.iwaca-btn-submit:active {
  transform: translateY(0);
}

.iwaca-btn-submit svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.iwaca-form-note {
  font-size: 12px;
  color: var(--iwaca-text-muted);
  text-align: center;
  line-height: 1.45;
  margin: 0;
}

.iwaca-form-note a {
  color: var(--iwaca-gold);
  text-decoration: underline;
}

/* Success State */
.iwaca-form-success {
  display: none;
  text-align: center;
  padding: 36px 20px;
  animation: iwacaFadeIn 0.3s ease;
}

.iwaca-form-success.is-visible {
  display: block;
}

.iwaca-form-body.is-hidden {
  display: none;
}

.iwaca-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px auto;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.14);
  color: #1a8f4c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iwaca-success-icon svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.iwaca-success-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--iwaca-graphite);
  margin: 0 0 10px 0;
}

.iwaca-success-text {
  font-size: 15px;
  color: var(--iwaca-text-muted);
  line-height: 1.5;
  margin: 0 0 24px 0;
}

.iwaca-success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.iwaca-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: #FFFFFF;
  border: 1px solid var(--iwaca-border-color);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--iwaca-graphite);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.iwaca-btn-secondary:hover {
  border-color: var(--iwaca-gold);
  color: var(--iwaca-gold);
}

/* Header Navigation CTA Button */
.iwaca-header-cta-item {
  display: inline-flex;
  align-items: center;
}

.iwaca-header-cta-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background-color: var(--iwaca-gold) !important;
  color: #FFFFFF !important;
  padding: 8px 18px !important;
  border-radius: 40px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.3) !important;
  transition: all 0.2s ease !important;
}

.iwaca-header-cta-btn:hover {
  background-color: var(--iwaca-gold-hover) !important;
  color: #FFFFFF !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197, 160, 89, 0.45) !important;
}

/* Modal Popup Window */
.iwaca-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(17, 17, 17, 0.65);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.iwaca-modal.is-open {
  display: flex;
  opacity: 1;
}

.iwaca-modal-dialog {
  background: #FFFFFF;
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.iwaca-modal.is-open .iwaca-modal-dialog {
  transform: translateY(0);
}

.iwaca-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--iwaca-champagne);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  z-index: 10;
  transition: all 0.2s ease;
}

.iwaca-modal-close:hover {
  background: #E5DFD7;
  color: #000;
}

/* Floating Quick Action Button (Mobile & Desktop) */
.iwaca-float-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF !important;
  padding: 12px 20px;
  border-radius: 50px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(18, 140, 126, 0.35);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
}

.iwaca-float-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(18, 140, 126, 0.5);
  color: #FFFFFF !important;
}

.iwaca-float-cta svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Homepage Section Integration */
.iwaca-apply-section-block {
  max-width: 1100px;
  margin: 60px auto 40px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.iwaca-apply-section-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 40px;
  align-items: start;
}

.iwaca-apply-intro {
  text-align: left;
}

.iwaca-apply-intro h2 {
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--iwaca-graphite);
}

.iwaca-apply-intro p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--iwaca-text-muted);
  margin-bottom: 24px;
}

.iwaca-benefit-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.iwaca-benefit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--iwaca-graphite);
}

.iwaca-benefit-item svg {
  color: var(--iwaca-gold);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.iwaca-direct-contact {
  padding: 16px;
  background: var(--iwaca-champagne);
  border-radius: 12px;
  border-left: 3px solid var(--iwaca-gold);
}

.iwaca-direct-contact p {
  margin: 0 0 6px 0;
  font-size: 13px;
  color: var(--iwaca-text-muted);
}

.iwaca-direct-contact a {
  font-size: 16px;
  font-weight: 600;
  color: var(--iwaca-green);
  text-decoration: none;
}

@keyframes iwacaFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Rules */
@media (max-width: 900px) {
  .iwaca-apply-section-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .iwaca-form-grid {
    grid-template-columns: 1fr;
  }
  .iwaca-form-wrapper {
    padding: 24px 18px;
    border-radius: 12px;
  }
  .iwaca-form-title {
    font-size: 22px;
  }
  .iwaca-float-cta span {
    display: none;
  }
  .iwaca-float-cta {
    padding: 14px;
    bottom: 18px;
    right: 18px;
    border-radius: 50%;
  }
}
