/* ===== WordPress + WPForms adjustments for the AES landing page ===== */

/* Keep the sticky nav below the WordPress admin bar when logged in */
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }
@media (max-width: 600px) { .admin-bar .nav { top: 0; } }

/* Hidden field that receives the selected plan */
.aes-form .aes-plan { display: none !important; }

/* WPForms inside the booking modal */
.aes-form .wpforms-container {
  margin: 0 !important;
  --wpforms-field-background-color: var(--bg);
  --wpforms-field-border-color: var(--border);
  --wpforms-field-text-color: var(--text);
  --wpforms-label-color: var(--text);
  --wpforms-label-sublabel-color: var(--muted);
  --wpforms-label-error-color: var(--danger);
  --wpforms-field-border-radius: 10px;
  --wpforms-button-border-radius: 999px;
  --wpforms-button-background-color: var(--accent);
  --wpforms-button-text-color: #0a0b10;
}
.aes-form .wpforms-form .wpforms-field { padding: 0 0 1rem !important; }
.aes-form .wpforms-form .wpforms-field-label {
  color: var(--text) !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  margin-bottom: 0.35rem !important;
}
.aes-form .wpforms-form .wpforms-field-sublabel,
.aes-form .wpforms-form .wpforms-field-description { color: var(--muted) !important; }
.aes-form .wpforms-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.aes-form .wpforms-form select,
.aes-form .wpforms-form textarea {
  font: inherit !important;
  color: var(--text) !important;
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 0.7rem 0.9rem !important;
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  box-shadow: none !important;
}
.aes-form .wpforms-form input:focus,
.aes-form .wpforms-form select:focus,
.aes-form .wpforms-form textarea:focus { border-color: var(--accent) !important; outline: none !important; }
.aes-form .wpforms-form .wpforms-error,
.aes-form .wpforms-form em.wpforms-error,
.aes-form .wpforms-form label.wpforms-error { color: var(--danger) !important; font-size: 0.8rem !important; }
.aes-form .wpforms-form input.wpforms-error,
.aes-form .wpforms-form textarea.wpforms-error { border-color: var(--danger) !important; }
.aes-form .wpforms-required-label { color: var(--danger) !important; }

.aes-form .wpforms-submit-container { padding: 0.4rem 0 0 !important; }
.aes-form .wpforms-form button.wpforms-submit,
.aes-form .wpforms-form .wpforms-submit {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  padding: 1rem 1.6rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, var(--accent-light), var(--accent)) !important;
  color: #0a0b10 !important;
  font: inherit !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  cursor: pointer;
}
.aes-form .wpforms-form .wpforms-submit:hover { filter: brightness(1.08); }

.aes-form .wpforms-confirmation-container,
.aes-form .wpforms-confirmation-container-full {
  background: var(--surface-2) !important;
  border: 1px solid var(--accent) !important;
  color: var(--text) !important;
  border-radius: 12px;
  padding: 1rem 1.2rem !important;
}

.aes-notice {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid var(--danger);
  border-radius: 10px;
  padding: 0.8rem 1rem;
}

/* Closed pop-up must never catch clicks. WPForms sets visibility on its own
   container, which otherwise leaves an invisible, clickable form in the middle
   of the screen while the pop-up is closed. */
.modal:not(.is-open),
.modal:not(.is-open) * {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ===== Booking pop-up layout (v1.0.3) ===== */
.modal__dialog { width: min(700px, 100%); padding: 2rem; }
.modal__dialog .summary { margin: 1rem 0; }

/* WPForms "Medium" field size caps widths at 60%; use the full pop-up width */
.aes-form .wpforms-container,
.aes-form .wpforms-form,
.aes-form .wpforms-field-container,
.aes-form .wpforms-field,
.aes-form .wpforms-field-row,
.aes-form .wpforms-field-small,
.aes-form .wpforms-field-medium,
.aes-form .wpforms-field-large {
  max-width: 100% !important;
  width: 100% !important;
}

/* Two columns like the class version, so the form fits without scrolling */
.aes-form .wpforms-field-container {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  column-gap: 1rem;
}
.aes-form .wpforms-field { padding: 0 0 0.8rem !important; min-width: 0; }
.aes-form .wpforms-field-textarea,
.aes-form .wpforms-field-turnstile,
.aes-form .wpforms-field-captcha,
.aes-form .wpforms-field-gdpr-checkbox { grid-column: 1 / -1; }
.aes-form .wpforms-form textarea { height: 90px !important; min-height: 90px !important; }

@media (max-width: 560px) {
  .modal__dialog { padding: 1.6rem 1.2rem; }
  .aes-form .wpforms-field-container { grid-template-columns: 1fr; }
}
