/* Reusable component primitives layered on tokens */

.card {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  box-shadow: var(--elevation-1);
}

.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}

.chip.status-go { background: var(--status-go); }
.chip.status-hold { background: var(--status-hold); }
.chip.status-success { background: var(--status-success); }
.chip.status-failure { background: var(--status-failure); }
.chip.status-tbd { background: var(--status-tbd); color: #fff; }
.chip.status-infly { background: var(--status-infly); }
.chip.status-delayed { background: var(--status-delayed); }

/* Tabs */
.tabs { display: flex; gap: 8px; }
.tab-button {
  padding: 8px 12px;
  border-radius: var(--radius-2);
  background: var(--button-secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  cursor: pointer;
  transition: background var(--dur-med) var(--ease-standard), transform var(--dur-med) var(--ease-standard);
}
.tab-button:hover { background: var(--hover-bg); }
.tab-button.active {
  outline: none;
  background: var(--hover-active-bg);
  border-color: var(--primary-color);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Banners */
.banner {
  border-radius: var(--radius-2);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.banner.warning { background: var(--status-hold); color: #fff; }
.banner.info { background: var(--hover-active-bg); border: 1px solid var(--border-color); }

/* Modal primitive */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: none; align-items: center; justify-content: center;
  z-index: var(--z-modal);
}
.modal-backdrop.active { display: flex; }
.modal { background: var(--card-background); border: 1px solid var(--border-color); border-radius: var(--radius-3); max-width: 90%; }

/* Skeletons */
.skeleton { position: relative; overflow: hidden; }
.skeleton .skeleton-text,
.skeleton .skeleton-img {
  background: linear-gradient(90deg, var(--border-color) 0%, var(--background-color) 50%, var(--border-color) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* Skeleton utilities to avoid inline styles */
.skel-w-120 { width: 120px; }
.skel-w-80p { width: 80%; }
.skel-w-60p { width: 60%; }
.skel-w-100p { width: 100%; }
.skel-h-24 { height: 24px; }
.skel-h-28 { height: 28px; }
.skel-h-16 { height: 16px; }
.skel-h-40 { height: 40px; }
.skel-h-48 { height: 48px; }
.skel-mb-12 { margin-bottom: 12px; }
.skel-mb-8 { margin-bottom: 8px; }

/* Utilities */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.full-width { width: 100%; }
.is-hidden { display: none !important; }
