/**
 * AskDegree Operator Design System (AODS) - utilities
 * Requires tokens.css loaded first.
 * Spec: docs/UI-DESIGN-SYSTEM.md
 */

/* -------------------------------------------------------------------------- */
/* Visibility                                                                 */
/* -------------------------------------------------------------------------- */

.hidden {
  display: none !important;
}

.invisible {
  visibility: hidden;
}

/* -------------------------------------------------------------------------- */
/* Display                                                                    */
/* -------------------------------------------------------------------------- */

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.grid {
  display: grid;
}

/* -------------------------------------------------------------------------- */
/* Flex & alignment                                                           */
/* -------------------------------------------------------------------------- */

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-start {
  align-items: flex-start;
}

.items-center {
  align-items: center;
}

.items-end {
  align-items: flex-end;
}

.justify-start {
  justify-content: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

.justify-between {
  justify-content: space-between;
}

.flex-1 {
  flex: 1 1 0%;
}

.shrink-0 {
  flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/* Gap                                                                        */
/* -------------------------------------------------------------------------- */

.gap-1 {
  gap: var(--space-1);
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

/* -------------------------------------------------------------------------- */
/* Spacing - margin                                                           */
/* -------------------------------------------------------------------------- */

.m-0 {
  margin: 0;
}

.mt-0 {
  margin-top: 0;
}

.mt-2 {
  margin-top: var(--space-2);
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-6 {
  margin-top: var(--space-6);
}

.mb-0 {
  margin-bottom: 0;
}

.mb-2 {
  margin-bottom: var(--space-2);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.mx-auto {
  margin-inline: auto;
}

/* -------------------------------------------------------------------------- */
/* Spacing - padding                                                          */
/* -------------------------------------------------------------------------- */

.p-0 {
  padding: 0;
}

.p-3 {
  padding: var(--space-3);
}

.p-4 {
  padding: var(--space-4);
}

.p-5 {
  padding: var(--space-5);
}

.px-4 {
  padding-inline: var(--space-4);
}

.py-3 {
  padding-block: var(--space-3);
}

/* -------------------------------------------------------------------------- */
/* Width & max-width                                                          */
/* -------------------------------------------------------------------------- */

.w-full {
  width: 100%;
}

.max-w-narrow {
  max-width: var(--content-narrow);
}

.max-w-shell {
  max-width: var(--shell-max-width);
}

/* -------------------------------------------------------------------------- */
/* Text alignment                                                             */
/* -------------------------------------------------------------------------- */

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-uppercase {
  text-transform: uppercase;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -------------------------------------------------------------------------- */
/* Borders & surfaces                                                         */
/* -------------------------------------------------------------------------- */

.rounded-sm {
  border-radius: var(--radius-sm);
}

.rounded-md {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius);
}

.rounded-full {
  border-radius: var(--radius-full);
}

.border {
  border: 1px solid var(--border);
}

.bg-card {
  background: var(--card);
}

.bg-muted {
  background: var(--bg);
}

.bg-brand-soft {
  background: var(--brand-soft);
}

.shadow {
  box-shadow: var(--shadow);
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

/* -------------------------------------------------------------------------- */
/* Interactive states                                                         */
/* -------------------------------------------------------------------------- */

.cursor-pointer {
  cursor: pointer;
}

.cursor-not-allowed {
  cursor: not-allowed;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-75 {
  opacity: 0.75;
}

/* -------------------------------------------------------------------------- */
/* Layout grids (preview / portal)                                              */
/* -------------------------------------------------------------------------- */

.layout-sidebar,
.layout {
  display: grid;
  grid-template-columns: minmax(240px, var(--sidebar-width)) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  max-width: 100%;
}

@media (max-width: 900px) {
  .layout-sidebar,
  .layout {
    grid-template-columns: 1fr;
  }
}