/* ═══════════════════════════════════════════════════════════════════
   NMS — Consultation Form
   Reusable glassmorphism form with compact two-column layout.
   All selectors scoped under .nmsh-cf to prevent global leaks.
   ═══════════════════════════════════════════════════════════════════ */
.nmsh-cf {
  --cf-accent: #057485;
  --cf-accent-dark: #045a66;
  --cf-ink: #1a2332;
  --cf-muted: #5a6b7d;
  --cf-border: #e2e8f0;
  font-family: 'Nunito Sans', 'Jost', system-ui, sans-serif;
  box-sizing: border-box;
}
.nmsh-cf *, .nmsh-cf *::before, .nmsh-cf *::after { box-sizing: border-box; }

/* ── Card — Premium Glassmorphism ── */
.nmsh-cf-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(47px);
  backdrop-filter: blur(47px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 58px 29px rgba(255, 255, 255, 0.05);
  padding: 28px 24px;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
/* Top gradient line */
.nmsh-cf-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  z-index: 1;
}
/* Left gradient line */
.nmsh-cf-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), transparent, rgba(255, 255, 255, 0.3));
  z-index: 1;
}
@supports not (backdrop-filter: blur(1px)) {
  .nmsh-cf-card {
    background: rgba(10,37,64,0.92);
  }
}

/* ── Title & Subtitle ── */
.nmsh-cf-title {
  font-family: 'Spartan', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.2;
  position: relative;
  z-index: 2;
}
.nmsh-cf-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  margin: 0 0 14px;
  line-height: 1.4;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  position: relative;
  z-index: 2;
}

/* ── Form ── */
.nmsh-cf-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 2;
}

/* ── Row (two-column) ── */
.nmsh-cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ── Field ── */
.nmsh-cf-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nmsh-cf-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── Input ── */
.nmsh-cf-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  box-sizing: border-box;
}
.nmsh-cf-input::placeholder {
  color: rgba(255,255,255,0.4);
}
.nmsh-cf-input:focus {
  border-color: var(--cf-accent);
  box-shadow: 0 0 0 2px rgba(5,116,133,.2);
}

/* ── Select — Force opaque options ── */
select.nmsh-cf-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='rgba(255,255,255,0.7)' viewBox='0 0 20 20'%3E%3Cpath d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
  /* Fix vertical clipping */
  height: auto;
  min-height: 42px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  /* Text overflow */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Force native dropdown to render above glassmorphism */
  position: relative;
  z-index: 10;
}
select.nmsh-cf-input option {
  color: #1a2332;
  background: #fff;
  padding: 10px 12px;
  white-space: normal;
  min-height: 32px;
  line-height: 1.4;
}

/* ── Textarea ── */
textarea.nmsh-cf-input {
  min-height: 60px;
  resize: vertical;
}

/* ── Submit Button ── */
.nmsh-cf-submit {
  width: 100%;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--cf-accent) 0%, var(--cf-accent-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: 0 4px 16px rgba(5,116,133,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  letter-spacing: .3px;
}
.nmsh-cf-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(5,116,133,.45);
}
.nmsh-cf-submit:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
}

/* ── Status Messages ── */
.nmsh-cf-form-status {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  position: relative;
  z-index: 2;
}
.nmsh-cf-form-status.is-ok { color: #4ade80; }
.nmsh-cf-form-status.is-error { color: #f87171; }

/* ── Notice (when not configured) ── */
.nmsh-cf-notice {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 20px;
}

/* ── CF7 Overrides ── */
.nmsh-cf-card .wpcf7 {
  color: #fff;
  position: relative;
  z-index: 2;
}
.nmsh-cf-card .wpcf7 label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.nmsh-cf-card .wpcf7 input[type="text"],
.nmsh-cf-card .wpcf7 input[type="email"],
.nmsh-cf-card .wpcf7 input[type="tel"],
.nmsh-cf-card .wpcf7 select,
.nmsh-cf-card .wpcf7 textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease;
  box-sizing: border-box;
}
.nmsh-cf-card .wpcf7 input::placeholder,
.nmsh-cf-card .wpcf7 textarea::placeholder {
  color: rgba(255,255,255,0.4);
}
.nmsh-cf-card .wpcf7 input:focus,
.nmsh-cf-card .wpcf7 select:focus,
.nmsh-cf-card .wpcf7 textarea:focus {
  border-color: var(--cf-accent);
}
.nmsh-cf-card .wpcf7 select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='rgba(255,255,255,0.7)' viewBox='0 0 20 20'%3E%3Cpath d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
  /* Fix vertical clipping */
  height: auto;
  min-height: 42px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  /* Text overflow */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 10;
}
.nmsh-cf-card .wpcf7 select option {
  color: #1a2332;
  background: #fff;
  padding: 10px 12px;
  min-height: 32px;
  line-height: 1.4;
}
.nmsh-cf-card .wpcf7 .wpcf7-submit {
  width: 100%;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--cf-accent) 0%, var(--cf-accent-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: 0 4px 16px rgba(5,116,133,.35);
}
.nmsh-cf-card .wpcf7 .wpcf7-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(5,116,133,.45);
}
.nmsh-cf-card .wpcf7-form .wpcf7-response-output {
  border: none;
  padding: 6px 0;
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.nmsh-cf-card .wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ok { color: #4ade80; }
.nmsh-cf-card .wpcf7-form .wpcf7-response-output.wpcf7-validation-errors,
.nmsh-cf-card .wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ng { color: #f87171; }

/* ── Responsive ── */
@media(max-width:640px) {
  .nmsh-cf-card {
    max-width: 100%;
    padding: 24px 20px;
    border-radius: 16px;
  }
  .nmsh-cf-title {
    font-size: 18px;
  }
  .nmsh-cf-subtitle {
    font-size: 12px;
  }
  .nmsh-cf-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .nmsh-cf-input {
    padding: 10px 12px;
    font-size: 13px;
  }
  select.nmsh-cf-input,
  .nmsh-cf-card .wpcf7 select {
    min-height: 44px;
    padding-right: 36px;
  }
  .nmsh-cf-submit {
    padding: 11px 20px;
    font-size: 13px;
  }
}

@media(max-width:380px) {
  .nmsh-cf-card {
    padding: 20px 16px;
    border-radius: 14px;
  }
  .nmsh-cf-title {
    font-size: 16px;
  }
}

/* ── Reduced Motion ── */
@media(prefers-reduced-motion:reduce) {
  .nmsh-cf-input,
  .nmsh-cf-submit,
  .nmsh-cf-card {
    transition: none !important;
  }
}
