/* Telqaris shared form controls — standard from order restyle (7e04486).
   WCAG 2.2 AA focus + contrast via brand tokens. No UA default chrome. */
:root {
  --yc-form-line: var(--yc-line-strong, var(--line, #cfd6e4));
  --yc-form-bg: var(--yc-input-bg, #fff);
  --yc-form-ink: var(--yc-text, var(--ink, #0b1b3f));
  --yc-form-muted: var(--yc-text-muted, var(--muted, #4a5875));
  --yc-form-brand: var(--yc-brand, var(--brand, #e91e8c));
  --yc-form-err: var(--yc-danger, #b3261e);
  --yc-form-radius: var(--radius-sm, 12px);
  --yc-form-focus: var(--yc-focus, var(--yc-form-brand));
  --yc-form-focus-gap: var(--yc-focus-gap, #fff);
  --yc-form-font: var(--yc-font-body, var(--font, inherit));
}

html[data-theme="dark"] {
  --yc-form-bg: var(--yc-input-bg, #1a1216);
  --yc-form-focus-gap: var(--yc-focus-gap, #0C0609);
}

/* Shared control chrome used by contact, order, help search, availability, catterall, portal login, home postcode */
.yc-cf,
.yc-cf-done,
.yc-order-form,
.yc-login-form,
.yc-help-search,
.yc-av,
.lp-form,
.postcode-form {
  --cf-line: var(--yc-form-line);
  --cf-bg: var(--yc-form-bg);
  --cf-ink: var(--yc-form-ink);
  --cf-muted: var(--yc-form-muted);
  --cf-brand: var(--yc-form-brand);
  --cf-err: var(--yc-form-err);
  --cf-radius: var(--yc-form-radius);
  --cf-focus: var(--yc-form-focus);
  --cf-focus-gap: var(--yc-form-focus-gap);
  color: var(--cf-ink);
  font-family: var(--yc-form-font);
}

.yc-cf,
.yc-order-form,
.yc-login-form {
  position: relative;
}

.yc-cf label,
.yc-cf legend,
.yc-order-form label,
.yc-login-form label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--yc-text, var(--ink-2, #1c2b4a));
  margin-bottom: 6px;
}

.yc-cf-field,
.yc-ord-field,
.yc-login-field {
  margin: 0 0 16px;
  min-width: 0;
  width: 100%;
}

.yc-cf-row2,
.yc-ord-row2,
.yc-login-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

/* Text-like controls — kill UA appearance */
.yc-cf input[type="text"],
.yc-cf input[type="email"],
.yc-cf input[type="tel"],
.yc-cf input[type="url"],
.yc-cf input[type="number"],
.yc-cf input[type="search"],
.yc-cf input[type="password"],
.yc-cf input[type="date"],
.yc-cf input[type="file"],
.yc-cf input:not([type]),
.yc-cf select,
.yc-cf textarea,
.yc-order-form input[type="text"],
.yc-order-form input[type="email"],
.yc-order-form input[type="tel"],
.yc-order-form input[type="url"],
.yc-order-form input[type="number"],
.yc-order-form input[type="search"],
.yc-order-form input[type="password"],
.yc-order-form input[type="date"],
.yc-order-form input:not([type]),
.yc-order-form select,
.yc-order-form textarea,
.yc-login-form input[type="text"],
.yc-login-form input[type="email"],
.yc-login-form input[type="password"],
.yc-login-form input:not([type]),
.yc-help-search input[type="search"],
.yc-help-search input[type="text"],
.yc-av-field input,
.yc-av-field select,
.yc-av-field textarea,
.lp-input,
.lp-textarea,
.lp-select,
.postcode-form input {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1.5px solid var(--yc-form-line);
  border-radius: var(--yc-form-radius);
  font: inherit;
  font-family: var(--yc-form-font);
  font-size: 1rem;
  line-height: 1.35;
  background: var(--yc-form-bg);
  color: var(--yc-form-ink);
  min-height: 48px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.postcode-form input {
  border: 0;
  background: transparent;
  min-height: 44px;
  padding: 12px 18px;
}

.yc-cf select,
.yc-order-form select,
.yc-login-form select,
.lp-select,
.yc-av-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23867D81' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: var(--yc-form-bg);
  padding-right: 40px;
}

.yc-cf textarea,
.yc-order-form textarea,
.lp-textarea {
  min-height: 150px;
  resize: vertical;
}

.yc-order-form input[readonly],
.yc-login-form input[readonly] {
  opacity: 0.92;
  cursor: default;
}

/* Placeholders */
.yc-cf input::placeholder,
.yc-cf textarea::placeholder,
.yc-order-form input::placeholder,
.yc-order-form textarea::placeholder,
.yc-login-form input::placeholder,
.yc-help-search input::placeholder,
.yc-av-field input::placeholder,
.lp-input::placeholder,
.lp-textarea::placeholder,
.postcode-form input::placeholder {
  color: var(--yc-form-muted);
  opacity: 1;
}

/* Focus-visible (WCAG 2.2) */
.yc-cf input:focus-visible,
.yc-cf select:focus-visible,
.yc-cf textarea:focus-visible,
.yc-order-form input:focus-visible,
.yc-order-form select:focus-visible,
.yc-order-form textarea:focus-visible,
.yc-login-form input:focus-visible,
.yc-help-search input:focus-visible,
.yc-av-field input:focus-visible,
.yc-av-field select:focus-visible,
.lp-input:focus-visible,
.lp-textarea:focus-visible,
.lp-select:focus-visible,
.postcode-form input:focus-visible {
  outline: 3px solid var(--yc-form-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--yc-form-focus-gap);
  border-color: var(--yc-form-brand);
}

.postcode-form input:focus-visible {
  border-color: transparent;
}

.postcode-form:focus-within {
  box-shadow: 0 0 0 3px var(--yc-form-focus), var(--shadow-lg, 0 10px 30px -18px rgba(15, 27, 61, 0.35));
}

/* Error / invalid */
.yc-cf [aria-invalid="true"],
.yc-order-form [aria-invalid="true"],
.yc-login-form [aria-invalid="true"],
.yc-av-field input[aria-invalid="true"],
.yc-cf :user-invalid,
.yc-order-form :user-invalid,
.yc-login-form :user-invalid,
.lp-input:user-invalid,
.lp-select:user-invalid,
.lp-textarea:user-invalid {
  border-color: var(--yc-form-err);
}

/* Disabled */
.yc-cf :disabled,
.yc-order-form :disabled,
.yc-login-form :disabled,
.yc-help-search :disabled,
.yc-av-field :disabled,
.lp-input:disabled,
.lp-select:disabled,
.lp-textarea:disabled,
.postcode-form :disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: color-mix(in srgb, var(--yc-form-bg) 85%, var(--yc-form-muted));
}

/* Autofill (Chromium) — keep brand colours */
.yc-cf input:-webkit-autofill,
.yc-order-form input:-webkit-autofill,
.yc-login-form input:-webkit-autofill,
.yc-help-search input:-webkit-autofill,
.yc-av-field input:-webkit-autofill,
.lp-input:-webkit-autofill,
.postcode-form input:-webkit-autofill {
  -webkit-text-fill-color: var(--yc-form-ink);
  caret-color: var(--yc-form-ink);
  box-shadow: 0 0 0 1000px var(--yc-form-bg) inset;
  transition: background-color 99999s ease-out;
}

/* Number spinners hidden */
.yc-cf input[type="number"]::-webkit-outer-spin-button,
.yc-cf input[type="number"]::-webkit-inner-spin-button,
.yc-order-form input[type="number"]::-webkit-outer-spin-button,
.yc-order-form input[type="number"]::-webkit-inner-spin-button,
.yc-login-form input[type="number"]::-webkit-outer-spin-button,
.yc-login-form input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.yc-cf input[type="number"],
.yc-order-form input[type="number"],
.yc-login-form input[type="number"] {
  -moz-appearance: textfield;
}

/* Search cancel (WebKit) — keep but tinted; still branded field */
.yc-help-search input[type="search"]::-webkit-search-cancel-button,
.yc-cf input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  width: 14px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' stroke='%23867D81' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  cursor: pointer;
}

/* Date picker icon tint */
.yc-cf input[type="date"]::-webkit-calendar-picker-indicator,
.yc-order-form input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.7;
  cursor: pointer;
  filter: none;
}

.yc-cf-req,
.yc-cf-opt,
.yc-ord-req,
.yc-ord-opt,
.yc-login-req,
.yc-login-opt {
  font-weight: 400;
  color: var(--yc-form-muted);
  font-size: 0.85rem;
}

.yc-cf-radios {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
}
.yc-cf-radios label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  min-height: 44px;
  margin: 0;
}
.yc-cf-radios input {
  width: 20px;
  height: 20px;
  accent-color: var(--yc-form-brand);
  flex: none;
}

.yc-cf-check,
.yc-ord-check,
.yc-login-check {
  margin: 0 0 12px;
}
.yc-cf-check label,
.yc-ord-check label,
.yc-login-check label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  min-height: 44px;
  cursor: pointer;
}
.yc-cf-check input[type="checkbox"],
.yc-cf-check input[type="radio"],
.yc-ord-check input[type="checkbox"],
.yc-ord-check input[type="radio"],
.yc-login-check input[type="checkbox"],
.yc-av-opt input[type="radio"],
.yc-av-opt input[type="checkbox"],
.lp-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--yc-form-brand);
  cursor: pointer;
}
.yc-cf-check input:focus-visible,
.yc-ord-check input:focus-visible,
.yc-login-check input:focus-visible,
.yc-cf-radios input:focus-visible,
.yc-av-opt input:focus-visible,
.lp-check input:focus-visible {
  outline: 3px solid var(--yc-form-focus);
  outline-offset: 2px;
}

.yc-ord-pc { max-width: 12rem; }

.yc-cf-hint,
.yc-login-hint {
  display: block;
  font-size: 0.85rem;
  color: var(--yc-form-muted);
  margin-top: 6px;
}

.yc-cf-err,
.yc-ord-err,
.yc-login-err,
.yc-av-err,
.lp-error {
  display: block;
  font-size: 0.9rem;
  color: var(--yc-form-err);
  font-weight: 600;
  margin-top: 6px;
}

.yc-cf-alert {
  border: 2px solid var(--yc-form-err);
  border-radius: var(--yc-form-radius);
  padding: 12px 16px;
  margin: 0 0 18px;
  color: var(--yc-form-ink);
}
.yc-cf-alert ul { margin: 6px 0 0 18px; padding: 0; }
.yc-cf-alert a { color: var(--yc-form-ink); }

.yc-cf-notice,
.yc-login-notice {
  font-size: 0.9rem;
  color: var(--yc-form-muted);
  margin: 4px 0 18px;
}
.yc-cf-notice a,
.yc-login-notice a { color: inherit; text-decoration: underline; }

.yc-cf-actions,
.yc-login-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.yc-cf-submit,
.yc-login-submit {
  min-height: 48px;
  padding: 12px 26px;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.yc-cf-submit[aria-disabled="true"],
.yc-login-submit[aria-disabled="true"],
.yc-cf-submit:disabled,
.yc-login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.yc-cf-status,
.yc-ord-status,
.yc-login-status {
  font-size: 0.95rem;
  color: var(--yc-form-muted);
  min-height: 1.4em;
  margin: 0 0 14px;
}

/* Honeypots: off-screen, out of a11y tree / tab order (markup also uses aria-hidden + tabindex=-1) */
.yc-cf-hp,
.yc-ord-hp,
.yc-av-hp,
.lp-hp,
.yc-login-hp {
  position: absolute !important;
  left: -10000px !important;
  top: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.yc-cf-hp input,
.yc-ord-hp input,
.yc-av-hp input,
.lp-hp input,
.yc-login-hp input {
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.yc-cf-done:focus { outline: none; }
.yc-cf-done h2 { margin-top: 0; }
.yc-cf-ref { font-size: 1.15rem; }
.yc-cf-ref strong {
  font-family: var(--yc-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  letter-spacing: 0.04em;
}
.yc-cf-next { padding-left: 20px; }
.yc-cf-next li { margin: 0 0 8px; }
.yc-cf-small { font-size: 0.9rem; color: var(--yc-form-muted); }

/* Help search row */
.yc-help-search-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.yc-help-search-row input { flex: 1 1 auto; min-width: 0; }
.yc-help-search-row .btn { min-height: 48px; flex: none; }

/* Portal login card */
.yc-login-card {
  max-width: 28rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  border: 1px solid var(--yc-form-line);
  border-radius: 16px;
  background: var(--yc-surface, var(--yc-form-bg));
}
.yc-login-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

@media (max-width: 640px) {
  .yc-cf-row2,
  .yc-ord-row2,
  .yc-login-row2 {
    grid-template-columns: 1fr;
  }
  .yc-ord-pc { max-width: none; }
  .yc-help-search-row { flex-direction: column; }
  .yc-help-search-row .btn { width: 100%; }
}
