/* CSS Document */
*,
*:before,
*:after {
  box-sizing: border-box;
}

.tabset {
  --tab-blue: #06c;
  --tab-border: #ccc;
  --tab-bg: #f6f6f6;
  --tab-text: #333;
}

/* Hide radios */
.tabset > input[type="radio"],
.tabset input[type="radio"],
.tabset input[type="radio"] + label:before {
  position: absolute;
  left: -200vw;
  display: none !important;
  width: 0 !important;
}

/* Hide panels by default */
.tabset .tab-panel {
  display: none;
}

/* Show selected panel */
.tabset > input:first-child:checked ~ .tab-panels > .tab-panel:first-child,
.tabset > input:nth-child(3):checked ~ .tab-panels > .tab-panel:nth-child(2),
.tabset > input:nth-child(5):checked ~ .tab-panels > .tab-panel:nth-child(3),
.tabset > input:nth-child(7):checked ~ .tab-panels > .tab-panel:nth-child(4),
.tabset > input:nth-child(9):checked ~ .tab-panels > .tab-panel:nth-child(5),
.tabset > input:nth-child(11):checked ~ .tab-panels > .tab-panel:nth-child(6) {
  display: block;
}

/* Labels */
.tabset > label {
  position: relative;
  display: inline-block;
  margin: 0 0.25rem 0.4rem 0;
  padding: 1em 2em !important;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: var(--tab-bg);
  color: var(--tab-text);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.tabset > label::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 8px;
  height: 4px;
  border-radius: 4px;
  background: #8d8d8d;
  transition: background 0.2s ease;
}

/* Hover / focus / active */
.tabset > label:hover,
.tabset > input:focus + label,
.tabset > input:focus-visible + label,
.tabset > input:checked + label {
  color: var(--tab-blue);
}

.tabset > label:hover::after,
.tabset > input:focus + label::after,
.tabset > input:focus-visible + label::after,
.tabset > input:checked + label::after {
  background: var(--tab-blue);
}

.tabset > input:focus-visible + label {
  outline: 3px solid rgba(0, 102, 204, 0.25);
  outline-offset: 2px;
}

.tabset > input:checked + label {
  background: #fff;
  border-color: var(--tab-border);
  border-bottom: 1px solid #fff;
  margin-bottom: -1px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

/* Panels wrapper */
.tab-panels {
  border-top: 1px solid var(--tab-border);
  background: #fff;
  margin-top:-7px;
}

/* Panel content */
.tab-panel {
  padding: 30px 0;
}



/* Mobile */
@media (max-width: 700px) {

  .tabset {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-end;
  }

  .tabset > label {
    display: inline-flex;
    width: auto;
    margin: 0;
    padding: 0.7em 1em !important;
    border: 1px solid var(--tab-border);
    border-radius: 8px 8px 0 0;
    font-size: 13px;
    white-space: nowrap;
  }

  .tabset > label::after {
    left: 15%;
    right: 15%;
  }

  .tab-panels {
    width: 100%;
    border: 1px solid var(--tab-border);
    border-radius: 10px;
    padding: 0 1rem;
    margin-top: 8px;
  }
}