/* SwimWise Matching Bot — pilot (self-contained)
   Brand: #2f6df0 / #00d2ff on dark navy. Mobile-first ~360px popup.
   Do not alter WP theme styles; all rules scoped under .swmb-*
*/
.swmb-root {
  --swmb-navy: #0f1b2d;
  --swmb-navy-2: #15263e;
  --swmb-text: #1e293b;
  --swmb-muted: #64748b;
  --swmb-blue: #2f6df0;
  --swmb-cyan: #00d2ff;
  --swmb-bg: #ffffff;
  --swmb-border: #e2e8f0;
  --swmb-radius: 16px;
  --swmb-shadow: 0 16px 40px rgba(15, 27, 45, 0.28);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
  z-index: 99990;
}
.swmb-root *, .swmb-root *::before, .swmb-root *::after { box-sizing: border-box; }

.swmb-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99991;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--swmb-blue), var(--swmb-cyan));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(47, 109, 240, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.swmb-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(47, 109, 240, 0.55); }
.swmb-fab:focus-visible { outline: 2px solid var(--swmb-cyan); outline-offset: 3px; }
.swmb-fab-icon { font-size: 18px; line-height: 1; }
.swmb-fab-label { white-space: nowrap; }
@media (max-width: 420px) {
  .swmb-fab-label { display: none; }
  .swmb-fab { padding: 14px; border-radius: 50%; }
}

.swmb-overlay {
  position: fixed;
  inset: 0;
  z-index: 99992;
  background: rgba(15, 27, 45, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.swmb-overlay.swmb-open { opacity: 1; visibility: visible; }

.swmb-panel {
  position: fixed;
  z-index: 99993;
  right: 16px;
  bottom: 76px;
  width: min(360px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 100px));
  display: flex;
  flex-direction: column;
  background: var(--swmb-bg);
  color: var(--swmb-text);
  border-radius: var(--swmb-radius);
  box-shadow: var(--swmb-shadow);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
}
.swmb-panel.swmb-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}
@media (max-width: 420px) {
  .swmb-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 72px;
  }
}

.swmb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  background: linear-gradient(135deg, var(--swmb-navy) 0%, var(--swmb-navy-2) 100%);
  color: #fff;
}
.swmb-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.swmb-header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.35;
}
.swmb-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.swmb-close:hover { background: rgba(255,255,255,0.18); }

.swmb-progress {
  height: 3px;
  background: #e2e8f0;
}
.swmb-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--swmb-blue), var(--swmb-cyan));
  transition: width 0.25s ease;
}

.swmb-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  -webkit-overflow-scrolling: touch;
}

.swmb-step-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--swmb-muted);
  margin: 0 0 6px;
}
.swmb-question {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--swmb-text);
}

.swmb-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.swmb-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border: 1px solid var(--swmb-border);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--swmb-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.swmb-option:hover,
.swmb-option:focus-visible {
  border-color: var(--swmb-blue);
  background: #eff6ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 109, 240, 0.15);
}
.swmb-option.swmb-unsure {
  border-style: dashed;
  color: var(--swmb-muted);
  background: #fff;
  font-weight: 500;
}

.swmb-results-intro {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--swmb-muted);
}
.swmb-card {
  border: 1px solid var(--swmb-border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}
.swmb-card-type {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--swmb-blue);
  margin-bottom: 4px;
}
.swmb-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}
.swmb-card .swmb-why {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--swmb-muted);
  line-height: 1.45;
}
.swmb-card a.swmb-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--swmb-blue);
  text-decoration: none;
}
.swmb-card a.swmb-link:hover { text-decoration: underline; }

.swmb-lead-note {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--swmb-muted);
  line-height: 1.4;
}
.swmb-field {
  margin-bottom: 10px;
}
.swmb-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--swmb-text);
  margin-bottom: 4px;
}
.swmb-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--swmb-border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--swmb-text);
  background: #fff;
}
.swmb-field input:focus {
  outline: none;
  border-color: var(--swmb-blue);
  box-shadow: 0 0 0 3px rgba(47, 109, 240, 0.15);
}
.swmb-error {
  margin: 0 0 8px;
  font-size: 12px;
  color: #dc2626;
  display: none;
}
.swmb-error.swmb-show { display: block; }

.swmb-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.swmb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.swmb-btn-primary {
  background: linear-gradient(135deg, var(--swmb-blue), var(--swmb-cyan));
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 109, 240, 0.3);
}
.swmb-btn-primary:hover { filter: brightness(1.05); }
.swmb-btn-secondary {
  background: #f1f5f9;
  color: var(--swmb-text);
}
.swmb-btn-ghost {
  background: transparent;
  color: var(--swmb-muted);
  font-weight: 600;
  padding: 8px;
}
.swmb-btn-ghost:hover { color: var(--swmb-text); }

.swmb-footer {
  padding: 8px 14px 12px;
  border-top: 1px solid var(--swmb-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.swmb-back {
  border: none;
  background: transparent;
  color: var(--swmb-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
}
.swmb-back:disabled { opacity: 0.35; cursor: default; }
.swmb-restart {
  border: none;
  background: transparent;
  color: var(--swmb-blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 0;
}

.swmb-done {
  text-align: center;
  padding: 8px 4px 4px;
}
.swmb-done h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
}
.swmb-done p {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--swmb-muted);
  line-height: 1.45;
}

.swmb-placeholder-warn {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: #fff7ed;
  border: 1px dashed #fb923c;
  border-radius: 8px;
  font-size: 11px;
  color: #9a3412;
  line-height: 1.4;
}
