/* The default Atticlet application composition. Import after components.css. */
@layer atticlet-components {
  :root, [data-skin="cream"] {
    --studio-object: url("./studio-art/cream-object.webp");
    --studio-scene: url("./studio-art/cream-scene.webp");
  }
  [data-skin="amethyst"] {
    --studio-object: url("./studio-art/amethyst-object.webp");
    --studio-scene: url("./studio-art/amethyst-scene.webp");
  }
  [data-skin="sea"] {
    --studio-object: url("./studio-art/sea-object.webp");
    --studio-scene: url("./studio-art/sea-scene.webp");
  }
  [data-skin="amber"] {
    --studio-object: url("./studio-art/amber-object.webp");
    --studio-scene: url("./studio-art/amber-scene.webp");
  }

  .at-studio-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    align-content: center;
    min-block-size: clamp(10rem, 20vw, 16rem);
    padding: clamp(var(--at-space-4), 4vw, var(--at-space-12));
    padding-inline-end: 40%;
    border-radius: var(--at-radius-16);
    background: var(--at-bg);
    color: var(--at-text);
    overflow-wrap: anywhere;
  }
  .at-studio-hero::before, .at-studio-hero::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
  }
  .at-studio-hero::before {
    background: linear-gradient(90deg, var(--at-bg) 5%, color-mix(in srgb, var(--at-bg) 92%, transparent) 55%, transparent), var(--studio-scene) center / cover;
  }
  .at-studio-hero::after {
    inset-inline-start: 62%;
    inset-inline-end: 3%;
    background: var(--studio-object) center / contain no-repeat;
  }
  .at-studio-layout { display: grid; align-items: start; gap: var(--at-space-6); }
  .at-studio-layout > * { min-width: 0; }
  .at-studio-list .at-row {
    display: grid;
    grid-template-columns: var(--at-space-10) minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--at-space-3);
    min-height: var(--at-space-16);
    overflow-wrap: anywhere;
  }
  .at-studio-tile {
    display: grid;
    place-items: center;
    inline-size: var(--at-space-10);
    block-size: var(--at-space-10);
    border-radius: var(--at-radius-12);
    background: color-mix(in srgb, var(--tile-color, var(--at-primary)) 15%, var(--at-surface));
    border: 1px solid color-mix(in srgb, var(--tile-color, var(--at-primary)) 48%, var(--at-surface));
    color: var(--at-text);
  }
  .at-studio-tile img { width: 85%; height: 85%; object-fit: contain; }
  /* Pair a mark with the row's accessible status text. */
  .at-studio-status {
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    flex: none;
    width: var(--at-space-8);
    height: var(--at-space-8);
    border: 2px solid currentColor;
    border-radius: 50%;
    color: var(--at-text-secondary);
    background: linear-gradient(145deg, var(--at-surface), color-mix(in srgb, currentColor 8%, var(--at-surface)));
    box-shadow: var(--at-elevation-low);
  }
  .at-studio-status[data-state="done"] { color: var(--at-success-text); }
  .at-studio-status[data-state="overdue"] { color: var(--at-danger-text); }
  .at-studio-status svg { width: var(--at-icon-md); height: var(--at-icon-md); }
  .at-studio-controls {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--at-space-1);
    padding: var(--at-space-1); border-radius: var(--at-radius-12);
    background: var(--at-control-ground); color: var(--at-control-text);
  }
  .at-studio-layout:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }

  @media (min-width: 760px) {
    .at-studio-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
    .at-studio-header .at-header__inner {
      grid-template-columns: auto minmax(0, 1fr) auto;
      gap: var(--at-space-3);
    }
    .at-studio-header .at-header__inner > nav { grid-column: 2; grid-row: 1; }
  }
  .at-studio-header {
    position: sticky;
    inset-block-start: 0;
    z-index: var(--at-z-sticky);
    padding-top: env(safe-area-inset-top, 0px);
  }
  .at-studio-header nav { min-width: 0; }
  .at-studio-header .at-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--at-space-1);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }
  .at-studio-header .at-nav > li { flex: none; }
  .at-studio-header .at-nav a { white-space: nowrap; }
  .at-primary-nav { padding-block: var(--at-space-1); }
  .at-primary-nav .at-nav { padding-inline-end: var(--at-space-1); }
  .at-studio-header .at-primary-nav .at-nav a {
    min-height: var(--at-space-12);
    min-width: var(--at-space-12);
    scroll-margin-inline: var(--at-space-1);
  }
  .at-studio-header .at-nav a:focus-visible {
    outline: var(--at-focus-width) solid var(--at-focus);
    outline-offset: calc(-1 * var(--at-focus-width));
  }
  .at-studio-header { background: var(--at-nav-ground); color: var(--at-nav-text); }
  .at-studio-header .at-nav a { color: var(--at-nav-text); }
  .at-studio-header .at-nav a[aria-current="page"] {
    color: var(--at-on-nav-selected);
    background: var(--at-nav-selected);
  }
}
