@layer features {

.plans-tasks-title {
  max-width: 480px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plans-tasks-type-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
}

.plans-tasks-tc-count {
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

/* Open work-item button — card-style icon button (subtle bg + border) */
.plans-tasks-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: var(--color-bg-surface-alt);
  border: var(--border-width-1) solid var(--color-divider);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.plans-tasks-view:hover {
  background: var(--c-neutral-100);
  color: var(--color-text-primary);
  border-color: var(--c-neutral-300);
}

/* ── Plans no-data state (MODEC "Oops!" 404 pattern) ──
 * Two-column layout: large hand-drawn illustration on the LEFT,
 * lede + helper text on the RIGHT. Light-weight large title. */
.plans-no-data {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  padding: var(--space-12) var(--space-8);
  min-height: 480px;
  text-align: left;
  flex-wrap: wrap;
}
.plans-no-data__image {
  width: 480px;
  max-width: 50%;
  height: auto;
  display: block;
  user-select: none;
  flex-shrink: 0;
}
.plans-no-data__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 460px;
  flex: 1 1 360px;
}
.plans-no-data__title {
  margin: 0;
  font-size: var(--font-size-3xl);             /* 40px (MODEC h3 size) */
  font-weight: var(--font-weight-light);       /* 300 — matches MODEC Oops! */
  color: var(--color-text-primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.plans-no-data__lede {
  margin: 0;
  font-size: var(--font-size-2xl);             /* 32px */
  font-weight: var(--font-weight-light);
  color: var(--color-text-primary);
  line-height: 1.3;
}
.plans-no-data__hint {
  margin: 0;
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 460px;
}
.plans-toolbar {
  display: flex;
  justify-content: flex-start;       /* MODEC: dropdowns + actions left-aligned */
  margin-bottom: 16px;
  width: 100%;
}

.plans-toolbar-controls {
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
}
/* Push Refresh button to the right edge of the toolbar row while keeping
 * the dropdowns left-grouped. */
.plans-toolbar-controls #plansRefreshBtn { margin-left: auto; }

.plans-iteration-banner {
  border: 1px solid var(--color-border-default);
  background: var(--color-bg-surface);
  padding: 16px 18px;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
}

.plans-iteration-banner-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plans-iteration-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: var(--font-weight-bold);
  color: var(--c-neutral-900);
}

.plans-iteration-actions {
  display: flex;
  gap: 8px;
}

.plans-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}

.plans-icon-link:hover {
  background: var(--color-border-default);
}

.plans-iteration-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.plans-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--color-success-text);
  color: var(--color-text-inverse);
}

/* Detail phase active → hide the project/team/iteration filter toolbar.
 * Toolbar is a sibling of #plansDetailPhase under #plansView. The
 * `:has()` selector keeps the rule self-contained (no extra class to
 * toggle in JS — just relies on the existing `.hidden` class on the
 * phases). */
#plansView:has(#plansDetailPhase:not(.hidden)) .plans-toolbar {
  display: none;
}

/* ID-cell link in the work-item table → opens the item in Azure DevOps.
 * Uses the design-system link color so it's visually consistent with
 * other inline links across the app. */
.plans-tasks-id-link {
  color: var(--color-text-link);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}
.plans-tasks-id-link:hover {
  color: var(--color-text-link-hover);
  text-decoration: underline;
}

/* Sprint timeline — sits inline next to the Sprint filter, vertically
 * centered with the dropdown row via the parent's `align-items: center`.
 * No explicit `align-self` (was forcing stretch and pinning text to the top). */
.plans-iteration-meta {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-family-sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-accent);
}
.plans-iteration-dates {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-accent);
}
.plans-iteration-meta:has(.plans-iteration-dates:empty) {
  display: none;       /* collapses when there are no dates to show */
}

.plans-message {
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
  font-size: var(--font-size-sm);
}

.plans-message--error {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.plans-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plans-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  cursor: pointer;
  font: inherit;
  color: var(--color-text-primary);
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

/* Override global button:hover (dark fill) — cards must stay readable */
.plans-card:hover {
  background: var(--color-bg-surface-alt);
  color: var(--color-text-primary);
  border-color: var(--color-text-muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.plans-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.plans-card-id-title {
  flex: 1;
  min-width: 0;
  font-weight: var(--font-weight-semibold);
  font-size: 15px;
  line-height: 1.4;
}

.plans-card-type {
  flex-shrink: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(200px, 46%);
  padding: 5px 10px 5px 6px;
  border-radius: var(--radius-md);
  background: var(--color-bg-surface-alt);
  color: var(--color-text-secondary);
}

.plans-card-type__icon-wrap {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.plans-card-type__icon {
  display: block;
}

.plans-card-type__text {
  min-width: 0;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1.25;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plans-card-type--requirement {
  background: var(--color-info-bg);
  color: var(--color-accent);
}

.plans-card-type--user-story {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

/* TODO: tokenize when palette extends — decorative work-item-type swatches (violets, magentas, olive) below have no semantic equivalent yet */
.plans-card-type--pbi {
  background: #faf5ff;
  color: #7c3aed;
}

.plans-card-type--bug {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.plans-card-type--feature {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.plans-card-type--epic {
  background: var(--color-info-bg);
  color: var(--color-info-text);
}

.plans-card-type--impediment {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.plans-card-type--issue {
  background: #f5f3ff;
  color: #6d28d9;
}

.plans-card-type--chore {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.plans-card-type--change-request {
  background: var(--color-info-bg);
  color: var(--color-accent-active);
}

.plans-card-type--cr {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.plans-card-type--spike {
  background: #faf5ff;
  color: #7e22ce;
}

.plans-card-type--risk {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.plans-card-type--decision {
  background: var(--c-secondary-100);
  color: #be185d;
}

.plans-card-type--code-review {
  background: var(--color-info-bg);
  color: var(--color-info-text);
}

.plans-card-type--enabler-story {
  background: var(--color-info-bg);
  color: var(--color-info-text);
}

.plans-card-type--enabler {
  background: var(--color-success-bg);
  color: #4d7c0f;
}

.plans-card-type--wit-fallback-a {
  background: var(--color-bg-surface-alt);
  color: var(--color-text-secondary);
}

.plans-card-type--wit-fallback-b {
  background: var(--color-danger-bg);
  color: #be123c;
}

.plans-card-type--wit-fallback-c {
  background: var(--color-info-bg);
  color: var(--color-info-text);
}

.plans-card-type--wit-fallback-d {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.plans-card-type--wit-fallback-e {
  background: #f5f3ff;
  color: #5b21b6;
}

.plans-card-id {
  color: var(--color-text-primary);
  margin-right: 6px;
}

.plans-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-primary);
}

.plans-card-tests {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.plans-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-border-default);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.plans-card-state {
  display: inline-flex;
  align-items: center;
}

.plans-state-value {
  font-weight: var(--font-weight-semibold);
  font-size: 13px;
  color: var(--color-text-primary);
}

.plans-empty {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin: 8px 0;
}

} /* end @layer features */
