/* Control Plane guidance + bubble help (native CSS; no Lit required). */

/* ---- Bubble help (? popovers) ---- */
.cp-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 0.3rem;
}
.cp-help__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 1px solid #888;
  background: #f4f4f4;
  color: #444;
  font: 600 0.7rem/1 system-ui, sans-serif;
  cursor: help;
  padding: 0;
}
.cp-help__btn:hover,
.cp-help__btn:focus {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
  outline: none;
}
.cp-help__bubble {
  display: none;
  position: absolute;
  z-index: 40;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  transform: translateX(-50%);
  width: min(18rem, 70vw);
  padding: 0.65rem 0.75rem;
  background: #1a1a1a;
  color: #f5f5f5;
  border-radius: 8px;
  font: 400 0.8rem/1.35 system-ui, sans-serif;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  text-align: left;
  white-space: normal;
}
.cp-help__bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1a1a1a;
}
.cp-help:hover .cp-help__bubble,
.cp-help:focus-within .cp-help__bubble {
  display: block;
}
.cp-help__bubble a { color: #9ecbff; }

/* ---- Next-step guide card ---- */
.cp-guide {
  border: 1px solid #d0d7de;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 48%);
  padding: 1rem 1.15rem 1.1rem;
  margin: 0 0 1.5rem;
}
.cp-guide__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.cp-guide__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
}
.cp-guide__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #666;
  font-weight: 600;
}
.cp-guide__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.cp-guide__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem 0.85rem;
  align-items: start;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
}
.cp-guide__item--recommended {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12);
}
.cp-guide__item--optional {
  opacity: 0.95;
}
.cp-guide__item--done_hint {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.cp-guide__badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  white-space: nowrap;
}
.cp-guide__item--recommended .cp-guide__badge {
  background: #2563eb;
  color: #fff;
}
.cp-guide__item--done_hint .cp-guide__badge {
  background: #16a34a;
  color: #fff;
}
.cp-guide__item-title {
  margin: 0 0 0.2rem;
  font-weight: 650;
  font-size: 0.95rem;
}
.cp-guide__item-body {
  margin: 0;
  color: #444;
  font-size: 0.88rem;
  line-height: 1.4;
}
.cp-guide__cta {
  display: inline-block;
  align-self: center;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff !important;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.cp-guide__item--recommended .cp-guide__cta {
  background: #2563eb;
}
.cp-guide__cta:hover { filter: brightness(1.08); }

/* ---- Lifecycle checklist ---- */
.cp-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}
.cp-checklist__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  font-size: 0.78rem;
  color: #555;
  background: #fafafa;
}
.cp-checklist__item--done {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
  font-weight: 600;
}
.cp-checklist__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #ccc;
}
.cp-checklist__item--done .cp-checklist__dot {
  background: #16a34a;
}

/* ---- Highlight target sections ---- */
.cp-section-highlight {
  animation: cp-pulse 1.6s ease-out 1;
  outline: 2px solid #93c5fd;
  outline-offset: 4px;
  border-radius: 6px;
}
@keyframes cp-pulse {
  0% { outline-color: #2563eb; background-color: #eff6ff; }
  100% { outline-color: #93c5fd; background-color: transparent; }
}

/* Field label row with help */
.cp-label-row {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.cp-field-hint {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #666;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .cp-guide__item {
    grid-template-columns: 1fr;
  }
  .cp-guide__cta { justify-self: start; }
}
