/* ==========================================================================
   Help / Support page (.hlp-*) + ticket form (.mspp-field / #mspp-ticket-form)
   Self-contained on design tokens. Reuses shared primitives (msp-container,
   sa-section, sa-head, msp-btn). Form field names/ids match the Manage MSPP
   public ticket-form contract — do not rename.
   ========================================================================== */

/* --- Hero contact chips --------------------------------------------------- */
.hlp-hero__chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.hlp-chip {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-size: 0.88rem; font-weight: 600; color: var(--heading);
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px; padding: 9px 16px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.hlp-chip:hover { border-color: var(--brand-green); color: var(--brand-green); }
.hlp-chip svg, .hlp-chip i { width: 15px; height: 15px; }
[data-theme="dark"] .hlp-chip { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.1); }

/* --- Self-serve cards ----------------------------------------------------- */
.hlp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: clamp(1.5rem, 3vw, 2rem); }
.hlp-card {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 14px; padding: 22px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.hlp-card:hover { transform: translateY(-3px); border-color: var(--brand-green); box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--heading) 30%, transparent); }
[data-theme="dark"] .hlp-card { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }
.hlp-card__icon { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--brand-green); background: color-mix(in srgb, var(--brand-green) 10%, transparent); margin-bottom: 6px; }
.hlp-card__icon svg { width: 20px; height: 20px; }
.hlp-card__title { font-size: 1.02rem; font-weight: 700; color: var(--heading); }
.hlp-card__desc { font-size: 0.9rem; line-height: 1.5; color: var(--text); flex: 1; }
.hlp-card__more { font-size: 0.85rem; font-weight: 700; color: var(--brand-green); }

/* --- Support / ticket form section (side-by-side) ------------------------- */
.hlp-support { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.hlp-aside__h1 { font-family: var(--font-brand); font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.15rem); font-weight: 700; color: var(--heading); line-height: 1.04; letter-spacing: -0.8px; margin: 0 0 18px; }
.hlp-aside__title { font-family: var(--font-brand); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); font-weight: 700; color: var(--heading); line-height: 1.15; margin: 0 0 12px; }
.hlp-aside__intro { font-size: 1.05rem; line-height: 1.6; color: var(--text); margin: 0 0 26px; }

/* Quick-link chips (reuse .hlp-chip) */
.hlp-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }

/* Two support cards inside the aside (Knowledge Base + Email) */
.hlp-cards--aside { grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 4px; }
@media (max-width: 520px) { .hlp-cards--aside { grid-template-columns: 1fr; } }

/* Teams whitelist note */
.hlp-note {
  margin-top: 12px;
  padding: 16px 18px; border-radius: 12px;
  border-left: 3px solid var(--brand-cyan);
  background: color-mix(in srgb, var(--brand-cyan) 7%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--brand-cyan) 24%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--brand-cyan) 24%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--brand-cyan) 24%, transparent);
}
.hlp-note p { margin: 0; font-size: 0.86rem; line-height: 1.55; color: var(--text); }
.hlp-note p + p { margin-top: 12px; }
.hlp-note p b { color: var(--heading); font-weight: 700; }
[data-theme="dark"] .hlp-note { background: color-mix(in srgb, var(--brand-cyan) 10%, transparent); border-color: color-mix(in srgb, var(--brand-cyan) 28%, transparent); }
.hlp-expect { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.hlp-expect li { display: flex; align-items: flex-start; gap: 12px; font-size: 0.94rem; line-height: 1.45; color: var(--text); }
.hlp-expect__icon { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--brand-cyan); background: color-mix(in srgb, var(--brand-cyan) 12%, transparent); }
.hlp-expect__icon svg { width: 16px; height: 16px; }
.hlp-expect b { color: var(--heading); font-weight: 700; }
.hlp-alt { padding-top: 22px; border-top: 1px solid var(--hairline); font-size: 0.92rem; line-height: 1.6; color: var(--text-muted); }
.hlp-alt a { color: var(--brand-green); font-weight: 600; text-decoration: none; }
.hlp-alt a:hover { text-decoration: underline; }

/* --- Form card ------------------------------------------------------------ */
.hlp-formcard {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 18px; padding: clamp(24px, 3vw, 34px);
  box-shadow: 0 24px 60px -34px color-mix(in srgb, var(--heading) 30%, transparent);
}
[data-theme="dark"] .hlp-formcard { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); box-shadow: none; }
.hlp-formcard__h { font-family: var(--font-brand); font-size: 1.5rem; font-weight: 700; color: var(--heading); letter-spacing: -0.3px; text-align: center; margin: 0 0 24px; }

#mspp-ticket-form { display: flex; flex-direction: column; gap: 18px; }
.mspp-field { display: flex; flex-direction: column; gap: 7px; }
.mspp-field label { font-size: 0.86rem; font-weight: 700; color: var(--heading); }
.mspp-field input,
.mspp-field select,
.mspp-field textarea {
  font: inherit; font-size: 0.95rem; color: var(--heading);
  background: var(--bg); border: 1px solid var(--hairline); border-radius: 10px;
  padding: 12px 14px; width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mspp-field textarea { resize: vertical; min-height: 130px; }
.mspp-field input::placeholder, .mspp-field textarea::placeholder { color: var(--text-muted); }
.mspp-field input:focus,
.mspp-field select:focus,
.mspp-field textarea:focus {
  outline: none; border-color: var(--brand-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-green) 18%, transparent);
}
/* Error styling only after the user has interacted (native :user-invalid). */
.mspp-field input:user-invalid,
.mspp-field textarea:user-invalid,
.hlp-form--submitted .mspp-field input:invalid,
.hlp-form--submitted .mspp-field textarea:invalid {
  border-color: #e5484d;
  box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.15);
}
[data-theme="dark"] .mspp-field input,
[data-theme="dark"] .mspp-field select,
[data-theme="dark"] .mspp-field textarea {
  background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.12); color: #fff;
}

#mspp-submit {
  font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  color: #fff; background: var(--brand-green); border: none; border-radius: 11px;
  padding: 14px 20px; margin-top: 4px;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
#mspp-submit:hover { filter: brightness(1.06); }
#mspp-submit:disabled { opacity: 0.6; cursor: progress; }

#mspp-status { margin: 0; font-size: 0.92rem; line-height: 1.5; min-height: 1px; }
#mspp-status.is-success { color: var(--brand-green); font-weight: 600; }
#mspp-status.is-error { color: #e5484d; font-weight: 600; }
#mspp-status.is-pending { color: var(--text-muted); }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 860px) {
  .hlp-support { grid-template-columns: 1fr; gap: 28px; }
}
