/* ============================================================================
 * Issue #9532 D · M15-M18 — /my-tickets/ customer portal styles
 * ----------------------------------------------------------------------------
 * Light, neutral palette. Mobile-first. Honors the WordPress admin font.
 * Scope: every selector lives under .cw-customer-portal or .cw-mt-* — no
 * global resets, no body-level overrides, hot-zone isolated.
 *
 * @author Olivier RAVEAU - Oliv.Ai
 * @since 2026-05-23
 * ========================================================================= */

.cw-customer-portal {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 0 32px;
  font-family: Helvetica, Arial, sans-serif;
  color: #222;
}

.cw-customer-portal h2 {
  font-size: 22px;
  color: #003366;
  margin: 0 0 16px;
}

.cw-customer-portal table.widefat {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e6e8eb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.cw-customer-portal table.widefat th {
  background: #f5f7fa;
  font-size: 12px;
  text-transform: uppercase;
  color: #5c6873;
  letter-spacing: 0.5px;
  padding: 10px 12px;
}

.cw-customer-portal table.widefat td {
  padding: 10px 12px;
  font-size: 13px;
  vertical-align: middle;
}

.cw-customer-portal .cw-mt-reply-toggle {
  display: inline-block;
  font-size: 12px;
  background: #eef3f8;
  color: #003366;
  padding: 4px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
}
.cw-customer-portal .cw-mt-reply-toggle:hover {
  background: #003366;
  color: #fff;
}

.cw-mt-reply-panel {
  display: none;
  background: #fbfcfd;
  padding: 12px;
  border-top: 2px solid #003366;
}
.cw-mt-reply-panel.is-open {
  display: block;
}
.cw-mt-reply-panel textarea {
  width: 100%;
  min-height: 80px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 8px;
  font-family: inherit;
  font-size: 13px;
  box-sizing: border-box;
}
.cw-mt-reply-panel .cw-mt-reply-status {
  margin-top: 6px;
  font-size: 12px;
}
.cw-mt-reply-panel .cw-mt-reply-status.is-error { color: #b91c1c; }
.cw-mt-reply-panel .cw-mt-reply-status.is-ok    { color: #15803d; }

/* ─── Submission form (cw_submit_ticket shortcode) ────────────────────── */

.cw-mt-submit {
  max-width: 980px;
  margin: 28px auto 0;
  padding: 18px;
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cw-mt-submit h3 {
  margin: 0 0 14px;
  color: #003366;
  font-size: 17px;
  font-weight: 700;
}

.cw-mt-form label {
  display: block;
  margin: 12px 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5c6873;
  font-weight: 600;
}

.cw-mt-form .cw-mt-req {
  color: #dc2626;
  margin-left: 2px;
}

.cw-mt-form input[type=text],
.cw-mt-form textarea,
.cw-mt-form select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 13px;
  box-sizing: border-box;
  background: #fff;
}
.cw-mt-form textarea { resize: vertical; }
.cw-mt-form input[type=text]:focus,
.cw-mt-form textarea:focus,
.cw-mt-form select:focus {
  outline: none;
  border-color: #003366;
  box-shadow: 0 0 0 3px rgba(0,51,102,0.12);
}

.cw-mt-btn-primary,
.cw-mt-btn-secondary {
  display: inline-block;
  border: none;
  border-radius: 5px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  transition: background-color 120ms ease;
}
.cw-mt-btn-primary {
  background: #003366;
  color: #fff;
}
.cw-mt-btn-primary:hover { background: #00254a; }
.cw-mt-btn-primary:disabled { background: #6c757d; cursor: not-allowed; }

.cw-mt-btn-secondary {
  background: #eef3f8;
  color: #003366;
}
.cw-mt-btn-secondary:hover { background: #d9e2ec; }
.cw-mt-btn-secondary:disabled { background: #f5f7fa; color: #999; cursor: not-allowed; }

.cw-mt-status {
  margin-top: 10px;
  font-size: 13px;
  min-height: 1.2em;
}
.cw-mt-status.is-error { color: #b91c1c; }
.cw-mt-status.is-ok    { color: #15803d; }

/* ─── AI assist suggestion card ───────────────────────────────────────── */

.cw-mt-assist-out {
  margin-top: 12px;
}
.cw-mt-assist-card {
  background: #f0f7ff;
  border: 1px solid #c7dcef;
  border-radius: 6px;
  padding: 14px;
}
.cw-mt-assist-card.cw-mt-assist-err {
  background: #fff5f5;
  border-color: #fecaca;
  color: #991b1b;
}
.cw-mt-assist-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}
.cw-mt-assist-row label {
  flex: 0 0 24px;
  text-align: center;
}
.cw-mt-assist-cta {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.cw-mt-notice {
  background: #fffbea;
  border: 1px solid #f9e29c;
  padding: 12px 16px;
  border-radius: 5px;
  margin: 16px 0;
  font-size: 13px;
  color: #92400e;
}
.cw-mt-notice a {
  color: #92400e;
  text-decoration: underline;
  font-weight: 600;
}

/* Severity badge palette (matches the listing table inline styles). */
.cw-mt-sev-SEV-1 { background: #dc3545; color: #fff; }
.cw-mt-sev-SEV-2 { background: #fd7e14; color: #fff; }
.cw-mt-sev-SEV-3 { background: #ffc107; color: #222; }
.cw-mt-sev-SEV-4 { background: #198754; color: #fff; }
