/*
 * Kouider — Lumo Forms (red & black glassmorphism)
 *
 * The plugin drives its own look from CSS variables and reinforces the key
 * properties with !important (assets/css/frontend.css lines ~1100-1170).
 * It also uses doubled selectors (.lf-form-wrap.lf-form-wrap) to out-specify
 * theme CSS. So here we (a) override its variables with !important — that beats
 * the inline vars the renderer prints on .lf-form-wrap — and (b) out-specify it
 * with an extra class where we need real decoration (the glass card).
 */

/* --- Section spacing + eyebrow (theme-side, plugin doesn't touch this) --- */
.k-contact-form {
  margin: clamp(2.5rem, 6vw, 5rem) 0;
}
.k-contact-form::before {
  content: "// send a message";
  display: block;
  color: var(--wp--preset--color--k-red-bright);
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: .9rem;
}

/* --- Push the house design into the plugin's own variables --- */
.k-contact-form .lf-form-wrap.lf-form-wrap {
  --lf-bg: transparent !important;
  --lf-field-bg: rgba(255,255,255,.05) !important;
  --lf-field-text: #ffffff !important;
  --lf-border: rgba(255,255,255,.14) !important;
  --lf-bw: 1px !important;
  --lf-radius: 10px !important;
  --lf-input-pad: 12px 16px !important;
  --lf-label-color: rgba(255,255,255,.55) !important;
  --lf-label-font-size: .78rem !important;
  --lf-label-spacing: .45rem !important;
  --lf-field-spacing: 18px !important;
  --lf-font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace !important;
  --lf-font-size: .95rem !important;
  --lf-line-height: 1.6 !important;
  --lf-border-focus: rgba(255,38,56,.6) !important;
  --lf-btn-bg: var(--wp--preset--color--k-red) !important;
  --lf-btn-text: #ffffff !important;
  --lf-btn-radius: 999px !important;
  --lf-btn-pad: 12px 30px !important;
  --lf-btn-border: none !important;

  /* Glass card — beats the plugin's `border: none !important` */
  background: linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.02)) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 14px !important;
  padding: clamp(20px, 4vw, 34px) !important;
  backdrop-filter: blur(10px);
}

/* --- Layout: single column, full-width fields --- */
.k-contact-form .lf-form-wrap .lf-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
.k-contact-form .lf-form-wrap .lf-field-wrap,
.k-contact-form .lf-form-wrap .lf-name-group,
.k-contact-form .lf-form-wrap .lf-name-col {
  width: 100% !important;
  max-width: 100% !important;
  flex: none;
}

/* --- Labels: mono eyebrow style --- */
.k-contact-form .lf-form-wrap .lf-field-label {
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  letter-spacing: .1em;
  text-transform: none;
}
.k-contact-form .lf-form-wrap .lf-field-label .lf-required,
.k-contact-form .lf-form-wrap .lf-required {
  color: var(--wp--preset--color--k-red-bright) !important;
  font-weight: 800;
}

/* --- Inputs (colors/padding come from the variables above; add the rest) --- */
.k-contact-form .lf-form-wrap .lf-form .lf-input,
.k-contact-form .lf-form-wrap .lf-form .lf-textarea,
.k-contact-form .lf-form-wrap .lf-form .lf-select {
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace !important;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.k-contact-form .lf-form-wrap .lf-form .lf-textarea {
  min-height: 130px;
  resize: vertical;
}
.k-contact-form .lf-form-wrap .lf-form .lf-input::placeholder,
.k-contact-form .lf-form-wrap .lf-form .lf-textarea::placeholder {
  color: rgba(255,255,255,.25) !important;
}
.k-contact-form .lf-form-wrap .lf-form .lf-input:focus,
.k-contact-form .lf-form-wrap .lf-form .lf-textarea:focus,
.k-contact-form .lf-form-wrap .lf-form .lf-select:focus {
  background-color: rgba(255,38,56,.03) !important;
}

/* --- Submit button: full-width red pill --- */
.k-contact-form .lf-form-wrap .lf-form .lf-submit-wrap {
  width: 100%;
  margin-top: .35rem;
}
.k-contact-form .lf-form-wrap .lf-form .lf-submit-btn {
  display: block;
  width: 100%;
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  letter-spacing: .04em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255,38,56,.3) !important;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.k-contact-form .lf-form-wrap .lf-form .lf-submit-btn:hover {
  transform: translateY(-2px);
  filter: none !important;
  opacity: 1 !important;
  box-shadow: 0 12px 32px rgba(255,38,56,.45) !important;
}

/* --- Help text, validation + success messages --- */
.k-contact-form .lf-form-wrap .lf-help-text {
  margin-top: .35rem;
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: .72rem;
  letter-spacing: .05em;
  color: rgba(255,255,255,.45);
}
.k-contact-form .lf-form-wrap .lf-form-messages {
  margin-top: .5rem;
  border-radius: 10px;
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: .84rem;
}
.k-contact-form .lf-form-wrap .lf-form-messages.lf-msg-success {
  border: 1px solid rgba(255,38,56,.35) !important;
  background: rgba(255,38,56,.06) !important;
  color: var(--wp--preset--color--k-white) !important;
}
.k-contact-form .lf-hp-field {
  position: absolute !important;
  left: -9999px !important;
}

/* --- Terms & Conditions consent row (Lumo "terms" field) --- */
.k-contact-form .lf-form-wrap .lf-form .lf-checkbox-option {
  gap: 10px !important;
  align-items: flex-start;
  margin-top: .2rem;
}
.k-contact-form .lf-form-wrap .lf-form .lf-checkbox-option label {
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace !important;
  font-size: .78rem !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  letter-spacing: .04em;
  color: rgba(255,255,255,.62) !important;
  margin: 0 !important;
  cursor: pointer;
}
.k-contact-form .lf-form-wrap .lf-form .lf-checkbox-option label a {
  color: var(--wp--preset--color--k-red-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.k-contact-form .lf-form-wrap .lf-form .lf-checkbox-option label a:hover {
  color: #fff;
}
.k-contact-form .lf-form-wrap .lf-form .lf-checkbox-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 2px 0 0;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 5px;
  background: rgba(255,255,255,.05);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.k-contact-form .lf-form-wrap .lf-form .lf-checkbox-option input[type="checkbox"]:hover {
  border-color: rgba(255,38,56,.5);
}
.k-contact-form .lf-form-wrap .lf-form .lf-checkbox-option input[type="checkbox"]:checked {
  background: var(--wp--preset--color--k-red);
  border-color: var(--wp--preset--color--k-red);
}
.k-contact-form .lf-form-wrap .lf-form .lf-checkbox-option input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.k-contact-form .lf-form-wrap .lf-form .lf-checkbox-option input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,38,56,.18);
}

/* --- Mobile --- */
@media (max-width: 781px) {
  .k-contact-form .lf-form-wrap.lf-form-wrap {
    padding: 20px 18px !important;
  }
}
