/* Department / program / intake pages shown inside the person page's workspace
   (html.pp-embedded, see layout.blade.php). Classic pages are unchanged.
   .pp-dup     – repeats what the person page already shows: hidden when embedded
   .pp-only    – only when embedded;  .pp-classic – only on the classic page */
.pp-only { display: none !important; }
html.pp-embedded .pp-only { display: revert !important; }
html.pp-embedded .pp-classic,
html.pp-embedded .pp-dup { display: none !important; }

html.pp-embedded {
  --ws-ink: #1f2238; --ws-muted: #6a6f8c; --ws-line: #e3e5f0; --ws-bg: #f5f6fb;
  --ws-accent: #5a5fe0; --ws-accent-soft: #eceefe;
}
html.pp-embedded body { color: var(--ws-ink); }
html.pp-embedded .container-fluid, html.pp-embedded .container-xxl { padding: 14px 16px 24px !important; }
html.pp-embedded .pp-eyebrow { display: block; font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ws-muted); margin-bottom: 2px; }

/* cards: flat, one border, one radius */
html.pp-embedded .card { border: 1px solid var(--ws-line); border-radius: 12px; box-shadow: none !important; }
html.pp-embedded .card.mt-4:first-child, html.pp-embedded .container-fluid > .card:first-child { margin-top: 0 !important; }
html.pp-embedded .card-header { background: transparent; border-bottom: 1px solid var(--ws-line); }
html.pp-embedded .card .card-body > h6.text-muted:first-child,
html.pp-embedded .card-body h6.text-muted.mb-3,
html.pp-embedded .card-body h6.text-muted.mb-2 {
  font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ws-muted) !important;
}

/* tabs: one underline style that wraps instead of overflowing */
html.pp-embedded .nav-tabs, html.pp-embedded .nav-align-top .nav-tabs {
  flex-wrap: wrap; border-bottom: 1px solid var(--ws-line); box-shadow: none; gap: 2px; background: transparent;
}
html.pp-embedded .nav-tabs .nav-link {
  border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0; background: transparent !important;
  color: var(--ws-muted); font-weight: 600; font-size: .85rem; padding: .6rem .8rem; box-shadow: none !important;
}
html.pp-embedded .nav-tabs .nav-link:hover { color: var(--ws-ink); }
html.pp-embedded .nav-tabs .nav-link.active { color: var(--ws-accent) !important; border-bottom-color: var(--ws-accent) !important; }

/* badges: readable soft pills rather than shouting labels */
html.pp-embedded .badge { border-radius: 99px; font-weight: 600; letter-spacing: 0; }
html.pp-embedded .badge.text-uppercase { text-transform: none !important; }

/* buttons and inputs */
html.pp-embedded .btn-sm { border-radius: 9px; }
html.pp-embedded .form-control, html.pp-embedded .form-select { border-radius: 9px; }

/* Forms & levels: the level tabs read as steps (General, Level 1, Level 2 …, Refer a friend) */
html.pp-embedded #programFormTabs { counter-reset: pp-step; gap: 6px; flex-wrap: wrap; }
html.pp-embedded #programFormTabs .nav-link {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ws-line); border-radius: 10px;
  background: #fff; color: var(--ws-ink); font-weight: 600; font-size: .85rem; padding: .45rem .8rem;
}
html.pp-embedded #programFormTabs .nav-item:not(:first-child):not(:last-child) .nav-link::before {
  counter-increment: pp-step; content: counter(pp-step);
  width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: .7rem; background: var(--ws-bg); color: var(--ws-muted);
}
html.pp-embedded #programFormTabs .nav-link.active { border-color: var(--ws-accent); background: var(--ws-accent-soft); color: var(--ws-accent); box-shadow: inset 0 0 0 1px var(--ws-accent); }
html.pp-embedded #programFormTabs .nav-link.active::before { background: var(--ws-accent) !important; color: #fff !important; }
html.pp-embedded #programFormTabs .nav-link.disabled { opacity: .55; }
html.pp-embedded .pf-head { border-radius: 12px; }

/* Tab rows built to scroll sideways (flex-nowrap + min-width:max-content) wrap instead. */
html.pp-embedded .scrollable-tabs-wrap { overflow: visible !important; }
html.pp-embedded .nav-tabs.flex-nowrap { flex-wrap: wrap !important; min-width: 0 !important; }

/* The person page shows its own sub-tabs and level steps above the workspace, so the
   page's own tab bar, the forms page header and its level tabs are hidden here.
   Their buttons stay in the page (hidden), so the native ones can click them. */
html.pp-embedded .card-header:has(> .scrollable-tabs-wrap),
html.pp-embedded .pf-head,
html.pp-embedded .bg-light:has(> #programFormTabs) { display: none !important; }
html.pp-embedded .card:has(> .card-header > .scrollable-tabs-wrap) { border-top-left-radius: 12px; }
/* Forms page: with its level list hidden, the form takes the full width. */
html.pp-embedded #programFormCanvas.pf-page > .modal-body { grid-template-columns: minmax(0, 1fr) !important; }
html.pp-embedded #programFormCanvas.pf-page > .modal-body > .tab-content { grid-column: 1 !important; }
