@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
  /* Brand Colors */
  --brand-1: #7c3aed; /* Dark Purple */
  --brand-2: #c084fc; /* Medium Purple */

  /* Beige */
  --brand-beige: rgba(247, 235, 218, 1);
  --brand-4: #dca9a4;
  --brand-5: #bc9d9a;
  --brand-6: #7ea295;
  --brand-7: #96a6bf;
  --brand-9: #a99fbb;
  --brand-10: #dba8a3;
  --brand-11: #d8a25c;

  /* Admin Colors */

  --admin-1: #1c2434;
  --admin-2: #f1f5f9;

  /* Neutral Colors */
  --white: #ffffff;
  --lighter: #f8fafc;
  --light: #e2e8f0;
  --midtone: #94a3b8;
  --mid-dark: #778bab;
  --dark: #334155;
  --darker: #0f172a;
  --black: #0f172a;

  --info: #1d4ed8;
  --info-light: #dbeafe;
  --success: #166534;
  --success-light: #bbf7d0;
  --warning: #f97316;
  --warning-light: #fed7aa;
  --error: #991b1b;
  --error-light: #ffe4e6;
  --link: var(--brand-1);
  --highlight: #fef08a;

  --input-color: rgba(226, 213, 196, 0.73);

  /* Other */
  --section-min-width: 320px;
  --section-max-width: 1600px;
  --header-height: 3.4rem;
  --text-max-width: 50rem;
  --form-max-width: 30rem;
  --border-radius: 3px;
  --fluid-gutter: var(--fluid-space-md);
}

.container {
  width: clamp(var(--section-min-width), 100%, var(--section-max-width));
}

/* Fluid wrap – direct children won't shrink below their min-width, then wrap */
flex-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--fluid-space-2xs);
}

/* Remember to set min-width on direct children of flex-wrap */
flex-wrap > * {
  flex-grow: 1;
  flex-shrink: 0;
  max-width: 100%;
}

hr {
  border: 0;
  border-top: 1px solid var(--light);
  margin: var(--fluid-space-lg) 0;
}

/* Typography
  --------------------------------------------------------------- */
@layer base {
  html {
    font-family: "Libre Baskerville", serif;
    font-display: swap;
  }
  body {
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
      env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
}

body,
button,
p {
  font-size: var(--fluid-text-base);
  line-height: 1.4;
  overflow-wrap: break-word;
}

p {
  margin-top: var(--fluid-space-xs);
  max-width: var(--text-max-width);
}

blockquote {
  padding-left: var(--fluid-space-xs);
  border-left: 6px solid var(--light);
  max-width: var(--text-max-width);
}

strong {
  @apply font-bold;
}

h1,
h2,
h3,
h4 {
  font-family: "Libre Baskerville";
}

h1 {
  font-size: var(--fluid-text-3xl);
  font-weight: 800;
  line-height: 1.1;
}

h2 {
  font-size: var(--fluid-text-xl);
  font-weight: 800;
  line-height: 1.1;
}

h3 {
  font-size: var(--fluid-text-lg);
  font-weight: bold;
  line-height: 1.1;
  margin-top: var(--fluid-space-lg);
  max-width: var(--text-max-width);
}

h4 {
  color: var(--brand-1);
  font-weight: bold;
  font-size: var(--fluid-text-lg);
  line-height: 1.1;
  margin-top: var(--fluid-space-md);
  max-width: var(--text-max-width);
}

a {
  font-weight: 700;
  text-decoration: none;
}

a:visited {
  font-weight: 700;
  text-decoration: none;
}

mark {
  background-color: var(--highlight);
}

form {
  max-width: var(--form-max-width);
}

code {
  font-family: monospace;
  font-size: var(--fluid-text-sm);
  background-color: var(--white);
  padding: 0.2rem 0.3rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--light);
}

/* Lists
  --------------------------------------------------------------- */
ul,
ol {
  margin-top: var(--fluid-space-sm);
  margin-left: var(--fluid-space-xs);
}

ul {
  list-style: disc;
}

ol {
  padding-left: 0;
}

ul li::before {
  position: absolute;
  left: calc(-1 * var(--fluid-space-xs) + 0.2rem);
  top: 1px;
  font-size: var(--fluid-text-sm);
  /* color: var(--brand-1); */
  list-style: circle;
}

ol li::before {
  content: counter(step-counter);
  display: block;
  position: absolute;
  color: var(--white);
  left: 0;
  line-height: var(--fluid-text-lg);
  width: var(--fluid-text-lg);
  border-radius: 50%;
  background-color: var(--brand-1);
  text-align: center;
  font-size: var(--fluid-text-sm);
}

ol li {
  list-style: none;
  counter-increment: step-counter;
  padding-left: var(--fluid-space-md);
  position: relative;
  line-height: var(--fluid-text-lg);
  margin-top: var(--fluid-space-xs);
  max-width: var(--text-max-width);
}

/* Forms
  --------------------------------------------------------------- */
.ui-form fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--fluid-space-sm);
}

.ui-form footer {
  display: flex;
  justify-content: space-between;
  margin-top: var(--fluid-space-md);
}

/* Other
  --------------------------------------------------------------- */

.shadow-button {
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.25);
}

.shadow-card {
  box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.25);
}

.gradient-overlay {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));
}
.debug {
  border: 2px dashed blue !important;
  outline: 2px dashed red !important;
}

error-message {
  @apply text-error text-@sm;
}

@layer components {
  .scrollbar::-webkit-scrollbar {
    width: 10px;
    height: 15px;
  }

  .scrollbar::-webkit-scrollbar-track {
    border-radius: 100vh;
    border: 1px solid var(--theme-color, var(--background-theme));
  }

  .scrollbar::-webkit-scrollbar-thumb {
    background: var(--theme-color, var(--background-theme));
    border-radius: 100vh;
  }

  /* .scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--theme-color, #c0a0b9);
    opacity: 0.8;
  } */
}
