/**
 * v3 native contact form — scoped so Elementor cannot override fields.
 * Brand tokens align with mirrored contact page (orange #ed5124, green #25ad5f).
 */

/* ----- Two-column row: image (Elementor) + native form (#formarea) ----- */
#ke-contact-wp-root #formarea .e-con-inner {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: stretch;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

#ke-contact-wp-root #formarea .e-con-inner > .e-child {
  flex: 1 1 300px;
  min-width: 260px;
  max-width: 100%;
}

#ke-contact-wp-root #formarea .elementor-widget-image img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  display: block;
}

/* Native column injected beside image */
#ke-contact-native.ke-contact-native-wrap {
  --ke-cn-orange: #ed5124;
  --ke-cn-green: #25ad5f;
  --ke-cn-green-dk: #209350;
  --ke-cn-text: #414141;
  --ke-cn-text-heading: #2c3e50;
  --ke-cn-muted: #64748b;
  --ke-cn-border: rgba(65, 65, 65, 0.12);
  --ke-cn-radius: 20px;
  --ke-cn-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 4px 10px -4px rgba(0, 0, 0, 0.04);

  isolation: isolate;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  background: transparent;
  font-family: "Montserrat", system-ui, -apple-system, sans-serif;
}

#ke-contact-native.ke-contact-native-wrap .ke-cn-inner {
  width: 100%;
  max-width: none;
  margin: 0;
}

/* Standalone fallback (merge failed): full-width band below WP */
#ke-contact-native.ke-contact-native--standalone {
  --ke-cn-orange: #ed5124;
  --ke-cn-green: #25ad5f;
  --ke-cn-green-dk: #209350;
  --ke-cn-text: #414141;
  --ke-cn-text-heading: #2c3e50;
  --ke-cn-muted: #64748b;
  --ke-cn-border: rgba(65, 65, 65, 0.12);
  --ke-cn-radius: 20px;
  --ke-cn-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 4px 10px -4px rgba(0, 0, 0, 0.04);

  isolation: isolate;
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #f7f7f7 0%, #ebebeb 100%);
  padding-block: 3rem 3.5rem;
  font-family: "Montserrat", system-ui, -apple-system, sans-serif;
}

#ke-contact-native.ke-contact-native--standalone .ke-cn-inner {
  max-width: 720px;
  margin-inline: auto;
}

#ke-contact-native .ke-cn-panel {
  background: #ffffff;
  border: 1px solid var(--ke-cn-border);
  border-radius: var(--ke-cn-radius);
  box-shadow: var(--ke-cn-shadow);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

#ke-contact-native .ke-cn-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ke-cn-muted);
  margin: 0 0 0.5rem;
}

#ke-contact-native .ke-cn-title {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  color: var(--ke-cn-text-heading);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

#ke-contact-native .ke-cn-title::after {
  content: "";
  display: block;
  width: 70px;
  height: 4px;
  border-radius: 3px;
  background: var(--ke-cn-orange);
  margin-top: 10px;
  margin-bottom: 4px;
}

#ke-contact-native .ke-cn-sub {
  font-size: 0.95rem;
  color: var(--ke-cn-muted);
  margin: 0 0 1.5rem;
  line-height: 1.55;
}

#ke-contact-native .ke-cn-grid {
  display: grid;
  gap: 1rem 1.25rem;
}

@media (min-width: 576px) {
  #ke-contact-native .ke-cn-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

#ke-contact-native .ke-cn-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

#ke-contact-native .ke-cn-field--full {
  grid-column: 1 / -1;
}

#ke-contact-native .ke-cn-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ke-cn-text-heading);
}

#ke-contact-native .ke-cn-input,
#ke-contact-native .ke-cn-textarea {
  width: 100%;
  border: 1px solid rgba(65, 65, 65, 0.15);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  color: var(--ke-cn-text);
  background: #fafafa;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#ke-contact-native .ke-cn-input:focus,
#ke-contact-native .ke-cn-textarea:focus {
  outline: none;
  border-color: rgba(237, 81, 36, 0.55);
  box-shadow: 0 0 0 3px rgba(237, 81, 36, 0.12);
  background: #fff;
}

#ke-contact-native .ke-cn-textarea {
  min-height: 8rem;
  resize: vertical;
}

#ke-contact-native .ke-cn-actions {
  margin-top: 0.35rem;
}

#ke-contact-native .ke-cn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background-image: linear-gradient(to right, var(--ke-cn-green), var(--ke-cn-green-dk));
  box-shadow: 0 4px 15px 0 rgba(37, 173, 95, 0.35);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

#ke-contact-native .ke-cn-submit:hover {
  filter: brightness(1.03);
  box-shadow: 0 6px 20px 0 rgba(37, 173, 95, 0.45);
  transform: translateY(-2px);
}

#ke-contact-native .ke-cn-submit:active {
  transform: translateY(0);
}

#ke-contact-native .ke-cn-foot {
  margin-top: 1.5rem;
  text-align: center;
}

#ke-contact-native .ke-cn-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(65, 65, 65, 0.12);
  background: #fff;
  color: var(--ke-cn-text-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

#ke-contact-native .ke-cn-wa:hover {
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.06);
  color: var(--ke-cn-green-dk);
}

#ke-contact-native .ke-cn-alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

#ke-contact-native .ke-cn-alert--ok {
  background: rgba(37, 173, 95, 0.1);
  border: 1px solid rgba(37, 173, 95, 0.35);
  color: #166534;
}

#ke-contact-native .ke-cn-alert--warn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #92400e;
}

#ke-contact-native .ke-cn-cross {
  margin-top: 1.5rem;
  text-align: center;
}

#ke-contact-native .ke-cn-cross a {
  color: var(--ke-cn-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

#ke-contact-native .ke-cn-cross a:hover {
  color: var(--ke-cn-orange);
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce_disabled_by_user) {
  #ke-contact-native .ke-cn-submit,
  #ke-contact-native .ke-cn-submit:hover {
    transition: none;
    transform: none;
  }
}
