/* pmg-business-mode.css (bm-2)
 *
 * Business Mode is a header-icon panel — NOT a 4th tab. The 💼 button
 * in the chassis-v3 topbar opens a right-side slide-in drawer with
 * three accordion sections: Brand Voice, Social Prompt Packs, Platform
 * Builder. The drawer assembles a single goal string and feeds it
 * into the existing #goal textarea + #prompt-form generation flow.
 *
 * Visual language matches the dark teal chassis-v3 theme.
 */

#pmg-bm-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
#pmg-bm-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

#pmg-bm-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 92vw);
  z-index: 99991;
  background: #0d2b1e;
  color: #e6f7ee;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#pmg-bm-drawer.is-open {
  transform: translateX(0);
}
@media (max-width: 480px) {
  #pmg-bm-drawer { width: 100vw; }
}

.pmg-bm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}
.pmg-bm-head h2 {
  margin: 0;
  font-size: 18px;
  color: #e6f7ee;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pmg-bm-head .pmg-bm-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #e6f7ee;
  font-size: 18px;
  cursor: pointer;
}
.pmg-bm-head .pmg-bm-close:hover {
  background: rgba(0, 200, 150, 0.08);
  color: #00c896;
}

.pmg-bm-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 18px;
  position: relative;
}

/* anchor-not-float-1: drawer footer holds the Build My Prompt button.
   Sits outside the scrollable body so the button is always visible at
   the drawer bottom — never floating mid-list over accordion sections. */
.pmg-bm-footer {
  flex: 0 0 auto;
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d2b1e;
}

/* Per-tool description line. Shown above the inputs inside every
   accordion body. */
.pmg-bm-desc {
  font-size: 13px;
  color: rgba(230, 247, 238, 0.70);
  margin: 0 0 4px;
  line-height: 1.5;
}

/* ============================================================
 * growth-mode-goal-groups-1
 * Shared "About Your Brand" header + 5 collapsible goal groups +
 * single sticky Build My Prompt button.
 * ============================================================ */

.pmg-bm-brand-header {
  border: 1px solid rgba(0, 200, 150, 0.28);
  border-radius: 12px;
  background: rgba(0, 200, 150, 0.06);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.pmg-bm-brand-header h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #e6f7ee;
}
.pmg-bm-brand-header-sub {
  margin: 0 0 12px;
  font-size: 12px;
  color: rgba(230, 247, 238, 0.65);
  line-height: 1.4;
}
.pmg-bm-brand-header-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* growth-mode-wave3-1: brand header split into Brand voice / Creator profile
   subsections, each with a small label so the user can tell them apart. */
.pmg-bm-brand-header-group {
  margin-top: 10px;
}
.pmg-bm-brand-header-group:first-of-type {
  margin-top: 4px;
}
.pmg-bm-brand-header-group-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 200, 150, 0.85);
}

/* growth-mode-wave3-1: per-tool "Build just this" button inside each
   accordion's body. Subdued vs the sticky Build All so visual hierarchy
   stays clear — Build All is the primary action, this is the shortcut. */
.pmg-bm-tool-build {
  display: inline-block;
  margin-top: 10px;
  background: transparent;
  color: #00c896;
  border: 1px solid rgba(0, 200, 150, 0.5);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pmg-bm-tool-build:hover {
  background: rgba(0, 200, 150, 0.1);
  border-color: #00c896;
  color: #00d9a3;
}
.pmg-bm-tool-build:active { transform: translateY(1px); }
.pmg-bm-tool-build:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.32);
}

.pmg-bm-goal-group {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  margin-bottom: 10px;
  overflow: hidden;
  padding: 0 0 8px;
}
.pmg-bm-goal-group > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  color: #e6f7ee;
  user-select: none;
}
.pmg-bm-goal-group > summary::-webkit-details-marker { display: none; }
.pmg-bm-goal-group > summary::after {
  content: '▾';
  color: #00c896;
  transition: transform 0.18s ease;
}
.pmg-bm-goal-group[open] > summary::after {
  transform: rotate(180deg);
}
.pmg-bm-goal-group > summary:hover {
  background: rgba(0, 200, 150, 0.06);
}
.pmg-bm-group-body {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* anchor-not-float-1: button is now in normal flow inside .pmg-bm-footer
   (a flex child of the drawer outside the scrollable body). No sticky,
   no z-index — it just sits at the drawer bottom like a proper footer. */
.pmg-bm-build-all {
  display: block;
  width: 100%;
  background: #00c896;
  color: #0d2b1e;
  border: none;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.pmg-bm-build-all:hover { background: #00d9a3; }
.pmg-bm-build-all:active { transform: translateY(1px); }
.pmg-bm-build-all:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.32);
}

/* Accordion sections (using <details>/<summary>) */
.pmg-bm-section {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 200, 150, 0.04);
  margin-bottom: 12px;
  overflow: hidden;
}
.pmg-bm-section[open] {
  background: rgba(0, 200, 150, 0.06);
}
.pmg-bm-section > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  color: #e6f7ee;
  user-select: none;
}
.pmg-bm-section > summary::-webkit-details-marker { display: none; }
.pmg-bm-section > summary::after {
  content: '▾';
  color: #00c896;
  transition: transform 0.18s ease;
}
.pmg-bm-section[open] > summary::after {
  transform: rotate(180deg);
}
.pmg-bm-section > summary:hover {
  background: rgba(0, 200, 150, 0.06);
}
.pmg-bm-sec-body {
  padding: 4px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pmg-bm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pmg-bm-field label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(230, 247, 238, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pmg-bm-field .pmg-bm-hint {
  font-size: 12px;
  color: rgba(230, 247, 238, 0.55);
  margin: 0;
}
.pmg-bm-input,
.pmg-bm-select,
.pmg-bm-textarea {
  width: 100%;
  background: #0a1f15;
  color: #e6f7ee;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}
.pmg-bm-textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.45;
}
.pmg-bm-input:focus,
.pmg-bm-select:focus,
.pmg-bm-textarea:focus {
  outline: none;
  border-color: #00c896;
  box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.18);
}

.pmg-bm-saved {
  font-size: 12px;
  color: #00c896;
  margin: 4px 0 0;
  min-height: 16px;
  transition: opacity 0.18s ease;
  opacity: 0;
}
.pmg-bm-saved.is-shown { opacity: 1; }

.pmg-bm-error {
  font-size: 12px;
  color: #ff8a8a;
  margin: 4px 0 0;
  min-height: 16px;
}
