/* ----------------------------------------------------------------
 * ! LAYOUT */

.flex-row {
  display: flex;
  flex-direction: row;
}

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

.space-between     { justify-content: space-between; }
.center-cross-axis { align-items: center; }
.w-fit-content     { width: fit-content; }

.gap-sm { gap: 0.25rem; }
.gap    { gap: 0.5rem;  }
.gap-1  { gap: 1rem;    }
.gap-2  { gap: 2rem;    }
.w-full { width: 100%;  }

.block  { display: block; }


/* ----------------------------------------------------------------
 * ! COLOR */

.half-opacity { opacity: 0.5; }

.bg-max       { background-color: var(--color--bg-max); }


/* ----------------------------------------------------------------
 * ! SPACING */

.py-1    { padding-block: 1rem; }

.mt-1    { margin-top: 1rem; }
.mt-2    { margin-top: 2rem; }
.mt-3    { margin-top: 3rem; }

.mb-1    { margin-bottom: 1rem; }
.mb-2    { margin-bottom: 2rem; }
.mb-3    { margin-bottom: 3rem; }

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


/* ----------------------------------------------------------------
 * ! TEXT */

.faded {
  color: var(--color--border-mid-contrast);
}

.text-light {
  font-weight: var(--font-weight--light);
}

.subtle-text {
  color: var(--color--aa-text);
}

.no-decoration {
  text-decoration: none;
}

.critical-text {
  color: red;
}

.success-text {
  color: green;
}

.ui-text {
  font-size: var(--font-size--ui);
  line-height: var(--line-height--ui);
}

.wrapping-inline-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem var(--space--xx-small);
  align-items: baseline;
}


/* ----------------------------------------------------------------
 * ! FORMS */

/* Make button_to forms behave like regular links */
.as-link {
  display: inline;
  padding: 0;
  margin: 0;
}

.as-link button {
  display: inline;
  padding: 0;
  font: inherit;
  color: var(--color--primary-base);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
}

/* .as-link button:hover {
  text-decoration: none;
} */


/* ----------------------------------------------------------------
 * ! SHADOWS */

:root {
  --card-shadow-and-border:   0 0 0 1px rgba(45, 45, 45, 0.08),
                              0 1px 3px 0 rgba(45, 45, 45, 0.12);

  --shadow-inset-card:  inset 0 0 1px 0 rgba(0,0,0,0.1),
                        inset 0 1px 2px 0 rgba(0,0,0,0.08);

  --shadow-lg:                0 10px 15px -3px rgb(0 0 0 / 0.1),
                              0 4px 6px -4px rgb(0 0 0 / 0.1);
                              
  --shadow-md:                0 5px 7px -2px rgb(0 0 0 / 0.1),
                              0 2px 3px -1px rgb(0 0 0 / 0.1);

  /* For checkboxes, radios, etc. */
  --toggle-shadow-and-border: 0 0 0 1px rgba(45, 45, 45, 0.16),
                              0 1px 3px 0 rgba(45, 45, 45, 0.16);
}

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


/* ----------------------------------------------------------------
 * ! DARK MODE */

html[data-theme="dark"] {
  --shadow-inset-card: inset 0 0 1px 0 rgba(0,0,0,1),
                       inset 0 1px 2px 0 rgba(0,0,0, 0.7);

  /* --card-shadow-and-border: inset 0 0 0 1px rgba(125, 125, 125, 0.15),
                            0 0 0 1px rgba(0, 0, 0, 1),
                            0 0 0 1px rgba(0, 0, 0, 0.16),
                            0 1px 3px 0 rgba(0, 0, 0, 0.24); */

}


/* ----------------------------------------------------------------
 * ! ICONS */

.phosphor-icon {
  flex-shrink: 0;
  min-width: max-content;
  min-height: max-content;
}
