/*
  Tab 05 — Visual Thumbnail Tabs — standalone HTML/CSS/JS implementation.
  No build step, no framework, no external dependency: copy index.html,
  this file, and script.js into any project as-is.
*/

:root {
  --card-accent: #39ff14;
  --card-fg: oklch(0.145 0 0);
  --card-muted: oklch(0.5 0 0);
  --card-border: oklch(0.9 0 0);
}

.gallery-tabs {
  width: 100%;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

.gallery-tabs__strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 0.75rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-tabs__strip::-webkit-scrollbar {
  display: none;
}

.gallery-tabs__tab {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  border: none;
  background: none;
  font-family: inherit;
  padding: 0;
  cursor: pointer;
  outline: none;
}

.gallery-tabs__tab:focus-visible {
  outline: 2px solid var(--card-accent);
  outline-offset: 4px;
}

.gallery-tabs__frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 0.75rem;
  width: 4rem;
  height: 4rem;
  box-shadow: 0 0 0 1px var(--card-border);
  opacity: 0.7;
  transition:
    transform 200ms ease-out,
    box-shadow 200ms ease-out,
    opacity 200ms ease-out;
}

.gallery-tabs__tab:hover .gallery-tabs__frame {
  opacity: 1;
}

.gallery-tabs__frame--active {
  transform: scale(1.12);
  box-shadow:
    0 0 0 1px var(--card-border),
    0 8px 20px -8px oklch(0.145 0 0 / 25%);
  opacity: 1;
}

.gallery-tabs__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 640px) {
  .gallery-tabs__frame {
    width: 5rem;
    height: 5rem;
  }
}

.gallery-tabs__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--card-muted);
  white-space: nowrap;
  transition:
    font-weight 200ms,
    color 200ms ease-out;
}

.gallery-tabs__label--active {
  font-weight: 600;
  color: var(--card-fg);
}

.gallery-tabs__stage {
  margin-top: 0.5rem;
}

.gallery-tabs__panel {
  animation: gallery-tabs-panel-in 260ms ease-out both;
}

.gallery-tabs__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 1rem;
}

.gallery-tabs__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-tabs__panel h3 {
  margin: 1rem 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--card-fg);
}

.gallery-tabs__panel p {
  margin: 0.375rem 0 0;
  max-width: 28rem;
  font-size: 0.875rem;
  color: var(--card-muted);
}

@keyframes gallery-tabs-panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-tabs__frame {
    transition: none;
  }

  .gallery-tabs__frame--active {
    transform: none;
  }

  .gallery-tabs__panel {
    animation: none;
  }
}

/*
  Page layout — the canvas this resource is presented on. Adjust or drop it
  when placing the resource inside your own layout.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #ffffff;
}
.tab05-layout {
  display: flex;
  min-height: 24rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2.5rem;
}
.tab05-layout__panel {
  width: 100%;
  max-width: 32rem;
}
