/* Art Hair consultation form, styled to match arthair.co.za
   Everything is scoped under #ah-form-root so Swipe Pages styles can't leak in or out. */

#ah-form-root {
  --ah-ink: #182433;
  --ah-body: rgba(60, 72, 84, 0.8);
  --ah-line: #dfe3e8;
  --ah-black: #222222;
  --ah-error: #d13b3b;
  --ah-radius: 10px;

  font-family: Helvetica, Arial, sans-serif;
  color: var(--ah-body);
  font-size: 17px;
  line-height: 1.5;
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

#ah-form-root *,
#ah-form-root *::before,
#ah-form-root *::after {
  box-sizing: border-box;
}

/* Background only. The card, padding, border and shadow come from the Swipe Pages section. */
#ah-form-root .ah-card {
  background: #ffffff;
}

#ah-form-root .ah-heading {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.25;
  color: var(--ah-ink);
  margin: 0 0 8px 0;
  text-align: center;
}

#ah-form-root .ah-sub {
  margin: 0 auto 26px auto;
  font-size: 16px;
  color: var(--ah-body);
  text-align: center;
  max-width: 560px;
}

/* Layout */
#ah-form-root .ah-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

#ah-form-root .ah-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

#ah-form-root .ah-grid .ah-field {
  margin-bottom: 0;
}

#ah-form-root label.ah-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ah-ink);
  margin-bottom: 7px;
}

#ah-form-root .ah-optional {
  font-weight: 400;
  color: #9aa3ad;
  letter-spacing: 0;
}

/* Inputs: 16px minimum so iOS doesn't zoom on focus */
#ah-form-root input[type="text"],
#ah-form-root input[type="email"],
#ah-form-root input[type="tel"],
#ah-form-root input[type="date"],
#ah-form-root select,
#ah-form-root textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--ah-ink);
  background: #ffffff;
  border: 1px solid var(--ah-line);
  border-radius: var(--ah-radius);
  padding: 13px 14px;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#ah-form-root textarea {
  min-height: 120px;
  resize: vertical;
}

#ah-form-root select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23182433' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

#ah-form-root input:focus,
#ah-form-root select:focus,
#ah-form-root textarea:focus {
  outline: none;
  border-color: var(--ah-black);
  box-shadow: 0 0 0 3px rgba(34, 34, 34, 0.08);
}

#ah-form-root input::placeholder,
#ah-form-root textarea::placeholder {
  color: #aab1b9;
}

#ah-form-root .ah-invalid input,
#ah-form-root .ah-invalid select,
#ah-form-root .ah-invalid textarea,
#ah-form-root .ah-invalid .ah-drop {
  border-color: var(--ah-error);
}

#ah-form-root .ah-error {
  display: none;
  font-size: 12.5px;
  color: var(--ah-error);
  margin-top: 6px;
}

#ah-form-root .ah-invalid .ah-error {
  display: block;
}

/* Photo upload */
#ah-form-root .ah-drop {
  border: 1px dashed var(--ah-line);
  border-radius: 12px;
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  background: #fcfcfd;
  transition: border-color 0.15s ease, background 0.15s ease;
}

#ah-form-root .ah-drop:hover,
#ah-form-root .ah-drop.ah-dragover {
  border-color: var(--ah-black);
  background: #f7f7f8;
}

#ah-form-root .ah-drop-main {
  font-size: 15px;
  color: var(--ah-ink);
}

#ah-form-root .ah-drop-browse {
  text-decoration: underline;
  font-weight: 600;
}

#ah-form-root .ah-drop-hint {
  font-size: 12.5px;
  color: #9aa3ad;
  margin-top: 6px;
}

#ah-form-root .ah-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

#ah-form-root .ah-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--ah-line);
  background: #f2f3f5;
}

#ah-form-root .ah-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#ah-form-root .ah-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 13px;
  line-height: 20px;
  padding: 0;
  cursor: pointer;
}

#ah-form-root .ah-file-input {
  display: none;
}

/* Consent: the native box is hidden and replaced by .ah-box, so no host stylesheet
   (Swipe Pages included) can render it invisible or unstyled. */
#ah-form-root .ah-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 22px 0 6px 0;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

#ah-form-root .ah-consent input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

#ah-form-root .ah-box {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 2px solid #b4bbc2;
  border-radius: 6px;
  background: #ffffff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#ah-form-root .ah-box::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 7px;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0.6);
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

#ah-form-root .ah-consent:hover .ah-box {
  border-color: var(--ah-black);
}

#ah-form-root .ah-consent input[type="checkbox"]:checked + .ah-box {
  background: var(--ah-black);
  border-color: var(--ah-black);
}

#ah-form-root .ah-consent input[type="checkbox"]:checked + .ah-box::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

#ah-form-root .ah-consent input[type="checkbox"]:focus-visible + .ah-box {
  box-shadow: 0 0 0 3px rgba(34, 34, 34, 0.18);
}

#ah-form-root .ah-invalid .ah-box {
  border-color: var(--ah-error);
}

/* Honeypot: offscreen rather than hidden, so bots still fill it */
#ah-form-root .ah-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Submit: the site's black pill button */
#ah-form-root .ah-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 24px auto 0 auto;
  padding: 14px 34px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background: var(--ah-black);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

#ah-form-root .ah-submit:hover:not(:disabled) {
  background: #000000;
  transform: translateY(-1px);
}

#ah-form-root .ah-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#ah-form-root .ah-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: ah-spin 0.7s linear infinite;
}

#ah-form-root .ah-sending .ah-spinner {
  display: block;
}

@keyframes ah-spin {
  to { transform: rotate(360deg); }
}

/* Form-level message */
#ah-form-root .ah-form-error {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--ah-radius);
  background: #fdf2f2;
  border: 1px solid #f3d4d4;
  color: var(--ah-error);
  font-size: 14px;
}

/* Success state */
#ah-form-root .ah-success {
  display: none;
  text-align: center;
  padding: 18px 10px;
}

#ah-form-root .ah-tick {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ah-black);
  color: #ffffff;
  font-size: 26px;
  line-height: 56px;
  margin: 0 auto 18px auto;
}

#ah-form-root .ah-success h3 {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 26px;
  color: var(--ah-ink);
  margin: 0 0 10px 0;
}

#ah-form-root .ah-success p {
  margin: 0 0 6px 0;
  font-size: 16px;
}

#ah-form-root .ah-ref {
  font-size: 12.5px;
  color: #9aa3ad;
  margin-top: 14px;
}

#ah-form-root.ah-done .ah-form-body {
  display: none;
}

#ah-form-root.ah-done .ah-success {
  display: block;
}

@media (max-width: 640px) {
  #ah-form-root .ah-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  #ah-form-root .ah-grid .ah-field {
    margin-bottom: 0;
  }
  #ah-form-root .ah-heading {
    font-size: 25px;
  }
  #ah-form-root .ah-submit {
    width: 100%;
  }
}
