@import url("base.css");

@font-face {
  font-family: "Spotify Mix";
  src: url("/public/fonts/SpotifyMix-Regular.eot");
  src:
    local("Spotify Mix Regular"),
    local("/public/fonts/SpotifyMix-Regular"),
    url("/public/fonts/SpotifyMix-Regular.eot?#iefix")
      format("embedded-opentype"),
    url("/public/fonts/SpotifyMix-Regular.woff2") format("woff2"),
    url("/public/fonts/SpotifyMix-Regular.woff") format("woff"),
    url("/public/fonts/SpotifyMix-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Spotify Mix";
  src: url("/public/fonts/SpotifyMix-Medium.eot");
  src:
    local("Spotify Mix Medium"),
    local("/public/fonts/SpotifyMix-Medium"),
    url("/public/fonts/SpotifyMix-Medium.eot?#iefix")
      format("embedded-opentype"),
    url("/public/fonts/SpotifyMix-Medium.woff2") format("woff2"),
    url("/public/fonts/SpotifyMix-Medium.woff") format("woff"),
    url("/public/fonts/SpotifyMix-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Spotify Mix";
  src: url("/public/fonts/SpotifyMix-Bold.eot");
  src:
    local("Spotify Mix Bold"),
    local("/public/fonts/SpotifyMix-Bold"),
    url("/public/fonts/SpotifyMix-Bold.eot?#iefix") format("embedded-opentype"),
    url("/public/fonts/SpotifyMix-Bold.woff2") format("woff2"),
    url("/public/fonts/SpotifyMix-Bold.woff") format("woff"),
    url("/public/fonts/SpotifyMix-Bold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Spotify Mix";
  src: url("/public/fonts/SpotifyMix-Extrabold.eot");
  src:
    local("Spotify Mix Extrabold"),
    local("/public/fonts/SpotifyMix-Extrabold"),
    url("/public/fonts/SpotifyMix-Extrabold.eot?#iefix")
      format("embedded-opentype"),
    url("/public/fonts/SpotifyMix-Extrabold.woff2") format("woff2"),
    url("/public/fonts/SpotifyMix-Extrabold.woff") format("woff"),
    url("/public/fonts/SpotifyMix-Extrabold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Spotify Mix";
  src: url("/public/fonts/SpotifyMix-Black.eot");
  src:
    local("Spotify Mix Black"),
    local("/public/fonts/SpotifyMix-Black"),
    url("/public/fonts/SpotifyMix-Black.eot?#iefix") format("embedded-opentype"),
    url("/public/fonts/SpotifyMix-Black.woff2") format("woff2"),
    url("/public/fonts/SpotifyMix-Black.woff") format("woff"),
    url("/public/fonts/SpotifyMix-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Encode Sans";
  src: url("../fonts/EncodeSansSemiCondensed-Bold.ttf");
  font-weight: 700;
  font-style: normal;
}

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.1884 0.0128 248.5103);
  --primary: oklch(0.6723 0.1606 244.9955);
  --primary-foreground: oklch(1 0 0);
  --chart-1: oklch(0.6723 0.1606 244.9955);
  --chart-2: oklch(0.6907 0.1554 160.3454);
  --chart-3: oklch(0.8214 0.16 82.5337);
  --chart-4: oklch(0.7064 0.1822 151.7125);
  --chart-5: oklch(0.5919 0.2186 10.5826);
  --sidebar: oklch(0.9784 0.0011 197.1387);
  --sidebar-foreground: oklch(0.1884 0.0128 248.5103);
  --sidebar-primary: oklch(0.6723 0.1606 244.9955);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.9392 0.0166 250.8453);
  --sidebar-accent-foreground: oklch(0.6723 0.1606 244.9955);
  --sidebar-border: oklch(0.9271 0.0101 238.5177);
  --sidebar-ring: oklch(0.6818 0.1584 243.354);
  --font-sans: "Spotify Mix", sans-serif;
  --font-brand: "Encode Sans", sans-serif;

  --sidebar-w: 17rem;
  --header-h: 56px;
  --container: 80rem;
  --container-narrow: 64rem;
}

.dark {
  --background: oklch(0 0 0);
  --foreground: oklch(0.9328 0.0025 228.7857);
  --primary: oklch(0.6692 0.1607 245.011);
  --primary-foreground: oklch(1 0 0);
  --chart-1: oklch(0.6723 0.1606 244.9955);
  --chart-2: oklch(0.6907 0.1554 160.3454);
  --chart-3: oklch(0.8214 0.16 82.5337);
  --chart-4: oklch(0.7064 0.1822 151.7125);
  --chart-5: oklch(0.5919 0.2186 10.5826);
  --sidebar: oklch(0.2097 0.008 274.5332);
  --sidebar-foreground: oklch(0.8853 0 0);
  --sidebar-primary: oklch(0.6818 0.1584 243.354);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.1928 0.0331 242.5459);
  --sidebar-accent-foreground: oklch(0.6692 0.1607 245.011);
  --sidebar-border: oklch(0.3795 0.022 240.5943);
  --sidebar-ring: oklch(0.6818 0.1584 243.354);
}

.container {
  width: min(var(--container), 100%);
  padding-inline: var(--spacing);
  margin-inline: auto;
}

.page-header {
  border-color: color-mix(in oklab, var(--border) 50%, transparent);
  margin-bottom: 2rem;

  .container-wrapper {
    margin-inline: auto;
    width: 100%;

    @media (width >= 1600px) {
      &:is(.layout-fixed *) {
        max-width: 98rem;
      }
    }

    & > div {
      display: flex;
      align-items: start;
      flex-direction: column;
      gap: 0.75rem;
    }
  }

  .page-header-container {
    width: 100%;
    container-type: inline-size;
    container-name: page-header-container;
    display: grid;
    grid-auto-rows: min-content;
    align-items: flex-start;
    gap: calc(var(--spacing) * 1);

    &:has(*.page-header-actions) {
      grid-template-columns: 1fr auto;
    }
    &:has(*.page-header-description) {
      grid-template-rows: auto auto;
    }
  }

  .page-header-heading {
    max-width: 48rem;
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: var(--tracking-tightest);
    text-wrap: pretty;
    line-height: 1.1;

    @media (width >= 48rem) {
      font-size: 1.875rem;
    }
  }
  .page-header-description {
    color: var(--muted-foreground);
    max-width: 48rem;
    font-size: 0.875rem;
    line-height: calc(1.25 / 0.875);
    text-wrap: balance;
    @media (width >= 40rem) {
      font-size: 0.9375rem;
      line-height: 1.375;
    }
  }
  .page-header-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--spacing) * 2);
    :is(& *) {
      &.button {
        box-shadow: var(--shadow-md);
      }
    }
  }
}

.flash-messages {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: calc(var(--spacing) * 2);
  margin-top: calc(var(--spacing) * 2);
  background-color: color-mix(in oklab, var(--destructive) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--destructive) 50%, transparent);
  border-radius: var(--radius-xl);

  .alert {
    width: 100%;
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.43;
    color: var(--destructive);

    & > svg {
      width: 1rem;
      height: 1rem;
      flex-shrink: 0;
      pointer-events: none;
    }
  }
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  background: var(--secondary);
  color: var(--secondary-foreground);
  font-family: var(--font-brand);
  border-radius: var(--radius);
  font-size: 1.375rem;
  line-height: 1;
}

.brand-name {
  font-size: 1.25rem;
  font-family: var(--font-brand);
  letter-spacing: var(--tracking-normal);
  text-transform: uppercase;
}

.login-body {
  height: 100vh;
  display: grid;
  place-items: center;

  .login-shell {
    width: 100%;
    max-width: 30rem;

    .login-brand {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: calc(var(--spacing) * 2);
      margin-bottom: calc(var(--spacing) * 6);
    }

    .login-card {
      background: var(--muted);
      padding: calc(var(--spacing) * 6);
      border-radius: var(--radius-xl);
      box-shadow: var(--shadow-lg);
      border-width: 1px;
      border-style: solid;

      .login-heading {
        font-weight: 600;
        font-size: 1.125rem;
        color: var(--muted-foreground);
        margin-bottom: calc(var(--spacing) * 6);
        text-align: center;
      }
    }
  }
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.25s var(--ease);
  transform: translateX(-100%);
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;

  &.is-open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  @media (width >= 62rem) {
    transform: translateX(0);
    position: relative;
  }
  & > .sidebar-brand {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-block: 0.75rem;
    padding-inline: 1rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;

    .brand-link {
      display: flex;
      align-items: center;
      gap: 0.5rem;

      & > .brand-mark {
        width: 1.875rem;
        height: 1.875rem;
        font-size: 1.25rem;
      }
      & > .brand-name {
        font-size: 1.125rem;
      }
    }

    .sidebar-close {
      display: block;
      background: none;
      border: none;
      color: var(--muted-foreground);
      font-size: 1rem;
      cursor: pointer;
      padding: 0.25rem;

      @media (width >= 62rem) {
        display: none;
      }
    }
  }

  & > .sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-inline: 1rem;
    padding-block: 1.25rem;
    overflow-y: auto;

    & > .nav-group {
      display: flex;
      flex-direction: column;
      gap: var(--spacing);

      & > .nav-group-label {
        display: block;
        font-weight: 600;
        font-size: 0.6875rem;
        letter-spacing: var(--tracking-widest);
        color: color-mix(in oklab, var(--muted-foreground) 50%, transparent);
        text-transform: uppercase;
        padding-inline: 0.625rem;
        padding-block: 0.5rem;
      }

      & > .nav-link {
        height: 2rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding-inline: 0.75rem;
        font-size: 1rem;
        font-weight: 500;
        color: color-mix(in oklab, var(--muted-foreground) 70%, transparent);
        background-color: transparent;
        transition: all 300ms var(--ease);
        border-radius: var(--radius-xl);
        letter-spacing: var(--tracking-tighter);

        &:hover,
        &.active {
          color: var(--sidebar-accent-foreground);
          background-color: color-mix(
            in oklab,
            var(--sidebar-accent) 100%,
            transparent
          );
        }

        & > svg {
          width: 1rem;
          height: 1rem;
          flex-shrink: 0;
        }
      }
    }
  }

  & > .button {
    margin-inline: 1rem;
    margin-bottom: 1rem;
    background-color: color-mix(in oklab, var(--foreground) 5%, transparent);
    border-radius: 9999px;
    overflow: hidden;

    &.sm {
      height: auto;
      padding-block: 0.25rem;
      padding-inline: 0.375rem;
    }

    & > .sidebar-user {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 0.5rem;

      & > .avatar {
        width: 1.75rem;
        height: 1.75rem;
        display: grid;
        flex-shrink: 0;
        place-items: center;
        background-color: color-mix(
          in oklab,
          var(--foreground) 10%,
          transparent
        );
        border-radius: 9999px;
        font-size: 0.75rem;
        font-weight: 600;
      }

      & > .info {
        min-width: 0;
        display: flex;
        flex-direction: column;
        color: var(--muted-foreground);
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        font-size: 0.875rem;
        font-weight: 600;
      }
    }
    & > .icon {
      width: 1.625rem;
      height: 1.625rem;
      display: grid;
      place-items: center;
      border-radius: 9999px;
      transition: background-color 150ms var(--ease);

      & > svg {
        width: 0.875rem;
        height: 0.875rem;
      }
    }

    &:not(*:disabled) {
      &:hover {
        @media (hover: hover) {
          & > .icon {
            background-color: var(--background);
          }
        }
      }
    }
  }
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: 1.25rem;
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;

  @media (width >= 62rem) {
    padding-inline: 1.5rem;
  }

  .button {
    &.js-sidebar-open {
      display: block;
      margin-left: -0.75rem;
      @media (width >= 62rem) {
        display: none;
      }

      & > svg {
        width: 1.25rem;
        height: 1.25rem;
      }
    }

    &.link {
      padding-inline: 0;
    }
    &.muted {
      border-color: var(--border);
    }
  }

  .button-group {
    margin-left: auto;
    @media (width >= 62rem) {
      margin-right: 0;
    }
  }
}

.content {
  flex: 1;
  overflow-y: auto;
  padding-block: 1rem;
  padding-inline: 1.25rem;

  @media (width >= 62rem) {
    padding-block: 1.75rem;
    padding-inline: 1.5rem;
  }
}

/* 7. Flash messages
   ---------------------------------------------------------- */
.flash {
  margin: 0;
  padding: 0.8rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 4px solid transparent;
}
.flash--success {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-foreground);
}
.flash--error {
  background: color-mix(in oklab, var(--destructive) 10%, transparent);
  border-color: color-mix(in oklab, var(--destructive) 40%, transparent);
  color: var(--destructive-foreground);
}
.flash--warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
  color: var(--warning);
}

/* Don't remove from this line below */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;

  & > .stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.625rem;

    & > .stat-content {
      flex: 1;
      display: flex;
      align-items: flex-end;
      line-height: 1;
      gap: 0.25rem;

      & > .stat-value {
        font-weight: 700;
        font-size: 1rem;
        color: var(--primary);
      }

      & > .stat-label {
        color: var(--muted-foreground);
        letter-spacing: var(--tracking-widest);
        font-size: 0.75rem;
        font-weight: 600;
      }
    }

    & > .stat-icon {
      width: 2rem;
      height: 2rem;
      display: grid;
      place-items: center;
      background-color: color-mix(in oklab, var(--accent) 90%, transparent);
      color: var(--accent-foreground);
      border-radius: var(--radius-md);

      & > svg {
        width: 1.25rem;
        height: 1.25rem;
      }
    }
  }
}

.section {
  width: 100%;
  :where(& > :not(:last-child)) {
    --tw-space-y-reverse: 0;
    margin-block-start: calc(calc(var(--spacing) * 3) * 0);
    margin-block-end: calc(calc(var(--spacing) * 3) * 1);
  }
}

.text-muted {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.form-wrapper {
  width: 100%;
  max-width: 76rem;

  &.narrow {
    max-width: 40rem;
  }

  &.center {
    margin-inline: auto;
  }
}
.upload-status {
  font-size: 14px;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.upload-status--ok {
  background: var(--accent);
  color: var(--accent-foreground);
  border: 0.5px solid color-mix(in oklab, var(--accent) 90%, transparent);
}

.upload-status--error {
  background: color-mix(in oklab, var(--destructive) 50%, transparent);
  color: var(--destructive);
  border: 0.5px solid color-mix(in oklab, var(--destructive) 50%, transparent);
}

.upload-status--warning {
  background: color-mix(in oklab, var(--warning) 50%, transparent);
  color: var(--warning);
  border: 0.5px solid var(--warning);
}

.upload-progress {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
}

.upload-progress__item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.875rem;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.upload-progress__item::before {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--progress, 0));
  transition:
    transform 0.35s ease,
    background 0.2s;
}

.upload-progress__item--uploading::before {
  background: var(--muted);
  transform: scaleX(var(--progress, 0.3));
}

.upload-progress__item--done::before {
  background: var(--accent);
  transform: scaleX(1);
  transition: transform 0.2s ease;
}

.upload-progress__item--error::before {
  background: color-mix(in oklab, var(--destructive) 50%, transparent);
  transform: scaleX(1);
}

.upload-progress__item--warning::before {
  background: var(--warning);
  transform: scaleX(1);
}

.upload-progress__name,
.upload-progress__state {
  position: relative;
  z-index: 1;
}

.upload-progress__name {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-progress__state {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.upload-progress__item--uploading .upload-progress__state {
  color: var(--muted-foreground);
}
.upload-progress__item--done .upload-progress__state {
  color: var(--accent-foreground);
}
.upload-progress__item--error .upload-progress__state {
  color: var(--destructive-foreground);
}
.upload-progress__item--warning .upload-progress__state {
  color: var(--warning-foreground);
}

@keyframes upload-spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: upload-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 12px;
}

.image-card {
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--input);
  background: var(--card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}

.image-card:hover {
  border-color: var(--border);
}

/* Cover / primary image — amber accent border */
.image-card.is-cover {
  border-color: var(--warning);
  border-width: 1.5px;
}

/* Being dragged — the card left behind */
.image-card.is-dragging {
  opacity: 0.4;
  border-style: dashed;
}

/* Valid drop target while dragging over it */
.image-card.drag-over {
  border-color: var(--primary);
  border-width: 1.5px;
  border-style: dashed;
}

/* ─── Thumbnail area ─────────────────────────────────────────────────────── */

.image-card__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--card);
  overflow: hidden;
}

.image-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.image-card:hover .image-card__thumb img {
  transform: scale(1.03);
}

.cover {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

.drag-handle {
  color: var(--muted-foreground);
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  cursor: grab;
  opacity: 0;
}

.image-card:hover .drag-handle {
  opacity: 1;
}

.drag-handle:active {
  cursor: grabbing;
}

.image-card__overlay {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--foreground) 50%, transparent);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 4px;
  padding: 8px;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 1;
}

.image-card:hover .image-card__overlay {
  opacity: 1;
}

/* ─── Action buttons (inside overlay) ───────────────────────────────────── */

.button:active {
  transform: scale(0.94);
}

/* Cover/star — amber when this image IS the cover */
.btn--cover-active {
  background: var(--warning);
  border-color: var(--warning);
  color: var(--warning-foreground);
}

/* ─── Meta / caption row ─────────────────────────────────────────────────── */

.image-card__meta {
  padding: 8px 10px;
  border-top: 0.5px solid var(--border);
  flex: 1;
  display: flex;
  align-items: flex-start;
}

.image-card__caption {
  font-size: 12px;
  color: var(--muted-foreground);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.image-card__caption .muted {
  font-style: italic;
}

.image-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
  color: var(--muted-foreground);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  z-index: 1;
  background: var(--background);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 2rem);
}

.modal__panel--sm {
  max-width: 340px;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}

.modal__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

.modal__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  flex: 1;
}

.modal__footer {
  padding: 0.875rem 1.25rem;
  border-top: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.modal__alert-body {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}

.modal__alert-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-background-danger);
  border: 0.5px solid var(--color-border-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-danger);
}

.modal__alert-text > p:first-child {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

.modal__alert-text > p + p {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.modal__panel :focus-visible {
  outline: 2px solid var(--color-border-info);
  outline-offset: 2px;
}

.modal__close:focus-visible {
  outline: 2px solid var(--color-border-info);
  outline-offset: 2px;
  border-color: transparent; /* override hover border so outline is the only indicator */
}

/* ─── Entry animation (optional) ─────────────────────────────────────────── */
/*
 * Uncomment if you want the panel to slide up on open.
 * The `hidden` attribute removal triggers the animation automatically
 * because the element goes from display:none → display:flex.
 *
 * Keep the animation short — 150ms feels instant enough to not be annoying
 * but still signals that something appeared intentionally.
 */

/*
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
 
.modal:not([hidden]) .modal__panel {
  animation: modal-in 150ms ease forwards;
}
*/
