/* All of these styles are *optional* and not required by the component JavaScript */

seven-minute-tabs {
  --smt-active: hsl(241, 100%, 47%);
	--smt-passiveborder: hsl(0 0% 0% / .26);
  --smt-intent: rgba(0,0,0,.06);

  --smt-border-size: 0.125em; /* 2px /16 */
  --smt-padding-block: .3125em;
  --smt-padding-inline: 1rem;
}
@media (prefers-color-scheme: dark) {
  seven-minute-tabs {
    --smt-active: hsl(241, 85%, 47%);
    --smt-passiveborder: hsl(0 100% 100% / .15);
    --smt-intent: rgba(255,255,255,.1);
  }
}

seven-minute-tabs {
	display: block;

  [role="tablist"] {
    display: flex;
    flex-wrap: wrap;
    line-height: 1.8;
    list-style: none;
    margin: 0;
    padding: 0;
    border-block: 1px solid var(--smt-passiveborder);
    border-block-start-width: 0;
  }

  [role="tabpanel"] {
    padding: var(--smt-padding-inline);
  }

  [role="tab"] {
    display: flex;
    align-items: center;
    padding: var(--smt-padding-block) var(--smt-padding-inline);
    margin: 0;
    text-decoration: none;
    min-width: min-content;
    flex-basis: auto;
    flex-grow: 0;
    text-indent: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
    border-block: var(--smt-border-size) solid transparent;
    border-block-start-width: 0;
  }
  [role="tab"][aria-selected="true"] {
    border-color: var(--smt-active);
  }
  [role="tab"]:is(:hover, :focus):not([aria-selected="true"]) {
    background-color: var(--smt-intent);
  }
}

/* Tabs on bottom */
seven-minute-tabs [role="tablist"]:is(:last-child) {
  border-block-start-width: 1px;
  border-block-end-width: 0;

  [role="tab"] {
    border-block-start-width: var(--smt-border-size);
    border-block-end-width: 0;
  }
}

/* Consistent height */
seven-minute-tabs[autoheight] [role="tabpanel"] {
	min-height: var(--smt-height);
}
