/* -------------------------------- 

File#: _1_tabs
Title: Tabs
Descr: A list of content sections (panels), accessible one at a time using control labels
Usage: codyhouse.co/license

-------------------------------- */

/* variables */
:root {
  /* colors */
  --th8-color-primary-hsl: 250, 84%, 54%;
  --th8-color-bg-hsl: 0, 0%, 100%;
  --th8-color-contrast-high-hsl: 230, 7%, 23%;
  --th8-color-contrast-higher-hsl: 230, 13%, 9%;
  --th8-color-contrast-medium-hsl: 225, 4%, 47%;
  --th8-color-accent-hsl: 342, 89%, 48%;
  --th8-color-contrast-lower-hsl: 240, 4%, 85%;

  /* spacing */
  --th8-space-sm: 0.75rem;
  --th8-space-md: 1.25rem;
  --th8-space-xs: 0.5rem;

  /* typography */
  --th8-text-lg: 1.25rem;
  --th8-text-sm: 0.833rem;
}

@media(min-width: 64rem){
  :root {
    /* spacing */
    --th8-space-sm: 1.125rem;
    --th8-space-md: 2rem;
    --th8-space-xs: 0.75rem;

    /* typography */
    --th8-text-lg: 1.75rem;
    --th8-text-sm: 1rem;
  }
}

/* component */
.tabs__control {
  text-decoration: none;
  color: hsl(var(--th8-color-contrast-medium-hsl));
}
.tabs__control:focus {
  outline: 2px solid hsla(var(--th8-color-primary-hsl), 0.2);
  outline-offset: 2px;
}
.tabs__control:hover {
  color: hsl(var(--th8-color-contrast-high-hsl));
}

.tabs__control[aria-selected=true] {
  color: hsl(var(--th8-color-contrast-high-hsl));
  text-decoration: underline;
}

/* utility classes */
.th8-text-lg {
  font-size: var(--th8-text-lg);
}

.th8-text-component :where(h1, h2, h3, h4) {
  line-height: var(--th8-heading-line-height, 1.2);
  margin-top: calc(var(--th8-space-md) * var(--th8-space-multiplier, 1));
  margin-bottom: calc(var(--th8-space-sm) * var(--th8-space-multiplier, 1));
}

.th8-text-component :where(p, blockquote, ul li, ol li) {
  line-height: var(--th8-body-line-height, 1.4);
}

.th8-text-component :where(ul, ol, p, blockquote, .th8-text-component__block) {
  margin-bottom: calc(var(--th8-space-sm) * var(--th8-space-multiplier, 1));
}

.th8-text-component :where(ul, ol) {
  padding-left: 1.25em;
}

.th8-text-component ul :where(ul, ol), .th8-text-component ol :where(ul, ol) {
  padding-left: 1em;
  margin-bottom: 0;
}

.th8-text-component ul {
  list-style-type: disc;
}

.th8-text-component ol {
  list-style-type: decimal;
}

.th8-text-component img {
  display: block;
  margin: 0 auto;
}

.th8-text-component figcaption {
  margin-top: calc(var(--th8-space-xs) * var(--th8-space-multiplier, 1));
  font-size: var(--th8-text-sm);
  text-align: center;}

.th8-text-component em {
  font-style: italic;
}

.th8-text-component strong {
  font-weight: bold;
}

.th8-text-component s {
  text-decoration: line-through;
}

.th8-text-component u {
  text-decoration: underline;
}

.th8-text-component mark {
  background-color: hsla(var(--th8-color-accent-hsl), 0.2);
  color: inherit;
}

.th8-text-component blockquote {
  padding-left: 1em;
  border-left: 4px solid hsl(var(--th8-color-contrast-lower-hsl));
  font-style: italic;
}

.th8-text-component hr {
  margin: calc(var(--th8-space-md) * var(--th8-space-multiplier, 1)) auto;
  background: hsl(var(--th8-color-contrast-lower-hsl));
  height: 1px;
}

.th8-text-component > *:first-child {
  margin-top: 0;
}

.th8-text-component > *:last-child {
  margin-bottom: 0;
}

.th8-text-component.th8-line-height-xs {
  --th8-heading-line-height: 1;
  --th8-body-line-height: 1.1;
}

.th8-text-component.th8-line-height-sm {
  --th8-heading-line-height: 1.1;
  --th8-body-line-height: 1.2;
}

.th8-text-component.th8-line-height-md {
  --th8-heading-line-height: 1.15;
  --th8-body-line-height: 1.4;
}

.th8-text-component.th8-line-height-lg {
  --th8-heading-line-height: 1.22;
  --th8-body-line-height: 1.58;
}

.th8-text-component.th8-line-height-xl {
  --th8-heading-line-height: 1.3;
  --th8-body-line-height: 1.72;
}

.th8-padding-top-md {
  padding-top: var(--th8-space-md);
}

.th8-gap-sm {
  gap: var(--th8-space-sm);
}

.th8-flex-wrap {
  flex-wrap: wrap;
}

.th8-flex {
  display: flex;
}

.th8-hide {
  display: none !important;
}