/**
 * HS6 Intel side drawer — uses raw CSS rather than Tailwind utilities so
 * pages opt in via two assets (`hs-intel-panel.js` + `hs-intel-panel.css`).
 */
#hs-intel-drawer { position: fixed; inset: 0; pointer-events: none; z-index: 60; font-family: 'Inter', system-ui, sans-serif; }
#hs-intel-drawer.is-open { pointer-events: auto; }

#hs-intel-drawer .hs-intel-backdrop {
  position: absolute; inset: 0; background: rgba(15,23,42,0.45);
  opacity: 0; transition: opacity 0.18s ease;
}
#hs-intel-drawer.is-open .hs-intel-backdrop { opacity: 1; }

#hs-intel-drawer .hs-intel-drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(440px, 100vw);
  background: #ffffff; color: #0f172a;
  box-shadow: -16px 0 32px rgba(15,23,42,0.18);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex; flex-direction: column;
}
#hs-intel-drawer.is-open .hs-intel-drawer { transform: translateX(0); }

@media (max-width: 480px) {
  #hs-intel-drawer .hs-intel-drawer { width: 100vw; }
}

.hs-intel-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #e2e8f0; gap: 12px;
}
.hs-intel-eyebrow { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #64748b; }
.hs-intel-title { margin: 4px 0 2px; font-size: 22px; font-weight: 700; color: #0f172a; }
.hs-intel-desc { margin: 0; font-size: 13px; color: #475569; line-height: 1.4; }
.hs-intel-close {
  background: transparent; border: none; font-size: 24px; line-height: 1;
  cursor: pointer; color: #475569; padding: 4px 8px; border-radius: 4px;
}
.hs-intel-close:hover { background: #f1f5f9; color: #0f172a; }

.hs-intel-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 20px 24px; }

.hs-intel-section { margin-bottom: 22px; }
.hs-intel-section h3 {
  font-size: 12px; font-weight: 600; color: #475569; text-transform: uppercase;
  letter-spacing: 0.04em; margin: 0 0 8px;
}

.hs-intel-sparkline { width: 100%; height: 70px; }
.hs-intel-svg-spark { width: 100%; height: 100%; }

.hs-intel-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hs-intel-table td { padding: 6px 4px; border-bottom: 1px solid #f1f5f9; }
.hs-intel-num { text-align: right; font-variant-numeric: tabular-nums; }

.hs-intel-calc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.hs-intel-calc label { display: flex; flex-direction: column; font-size: 12px; color: #475569; }
.hs-intel-calc input {
  margin-top: 2px; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px;
  font-size: 13px;
}
.hs-intel-calc button {
  grid-column: 1 / -1;
  margin-top: 4px; padding: 8px 12px; background: #0f172a; color: #fff;
  border: none; border-radius: 6px; cursor: pointer; font-weight: 600;
}
.hs-intel-calc button:hover { background: #1e293b; }

.hs-intel-calc-out { margin-top: 12px; padding: 10px 12px; background: #f8fafc; border-radius: 6px; }
.hs-intel-calc-grid { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 13px; }
.hs-intel-calc-grid dt { color: #475569; }
.hs-intel-calc-grid dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.hs-intel-calc-total { font-weight: 700; color: #0f172a; }

.hs-intel-related { list-style: none; padding: 0; margin: 0; }
.hs-intel-related li { margin: 6px 0; }
.hs-intel-related-link {
  display: flex; flex-direction: column; align-items: flex-start;
  width: 100%; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 8px 10px; cursor: pointer; text-align: left;
  font-family: inherit; color: #0f172a;
}
.hs-intel-related-link strong { color: #f97316; font-size: 13px; margin-bottom: 2px; }
.hs-intel-related-link span { font-size: 12px; color: #475569; line-height: 1.3; }

.hs-intel-fullpage { color: #f97316; text-decoration: none; font-weight: 600; font-size: 13px; }
.hs-intel-fullpage:hover { text-decoration: underline; }

.hs-intel-flag { margin: 6px 0 0; font-size: 11px; color: #92400e; background: #fef3c7; padding: 4px 8px; border-radius: 4px; }
.hs-intel-empty { font-size: 12px; color: #94a3b8; font-style: italic; }

.hs-intel-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; border-top: 1px solid #e2e8f0;
  background: #f8fafc; font-size: 11px; color: #475569;
}
.hs-intel-refresh {
  background: transparent; border: 1px solid #cbd5e1; color: #0f172a;
  padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 11px;
}
.hs-intel-refresh:hover { border-color: #94a3b8; background: #ffffff; }

.hs-intel-skeleton { display: flex; flex-direction: column; gap: 12px; }
.hs-intel-skel-line, .hs-intel-skel-block {
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%; animation: hs-intel-skel 1.4s ease infinite;
  border-radius: 4px;
}
.hs-intel-skel-line { height: 14px; }
.hs-intel-skel-block { height: 80px; }
@keyframes hs-intel-skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.hs-intel-error { padding: 20px; text-align: center; color: #b91c1c; }
.hs-intel-retry {
  margin-top: 8px; padding: 6px 12px; background: #b91c1c; color: #fff;
  border: none; border-radius: 4px; cursor: pointer;
}

[data-hs6] { cursor: pointer; }
[data-hs6]:hover { text-decoration: underline; text-decoration-style: dotted; }
