/* Tabs Component */

.tabs {
  width: 100%;
  position: relative;
  padding-bottom: 0;
}

.tabs input[type="radio"] {
  display: none;
}

.tab-nav {
  width: 100%;
  border-bottom: 1px solid var(--color-foreground);
  text-align: center;
}

.tab-label {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  border-bottom: 1px solid var(--color-foreground);
  transition: all 0.3s ease;
  color: var(--color-foreground);
  /*background-color: var(--color-background);*/
  margin-bottom: -1px;
  position: relative;
}

.tab-label:hover {
  background-color: var(--color-surface);
}

.tabs input[type="radio"]:checked + .tab-label {
  font-weight: 600;
  color: var(--color-foreground);
  background-color: var(--color-surface);
}

.tab-content {
  display: none;
  padding: 1.5rem 0;
  animation: fadeIn 0.3s ease;
}

/* Generic tab content display - supports up to 10 tabs */
.tabs
  input[type="radio"]:nth-of-type(1):checked
  ~ .content
  .tab-content:nth-of-type(1),
.tabs
  input[type="radio"]:nth-of-type(2):checked
  ~ .content
  .tab-content:nth-of-type(2),
.tabs
  input[type="radio"]:nth-of-type(3):checked
  ~ .content
  .tab-content:nth-of-type(3),
.tabs
  input[type="radio"]:nth-of-type(4):checked
  ~ .content
  .tab-content:nth-of-type(4),
.tabs
  input[type="radio"]:nth-of-type(5):checked
  ~ .content
  .tab-content:nth-of-type(5),
.tabs
  input[type="radio"]:nth-of-type(6):checked
  ~ .content
  .tab-content:nth-of-type(6),
.tabs
  input[type="radio"]:nth-of-type(7):checked
  ~ .content
  .tab-content:nth-of-type(7),
.tabs
  input[type="radio"]:nth-of-type(8):checked
  ~ .content
  .tab-content:nth-of-type(8),
.tabs
  input[type="radio"]:nth-of-type(9):checked
  ~ .content
  .tab-content:nth-of-type(9),
.tabs
  input[type="radio"]:nth-of-type(10):checked
  ~ .content
  .tab-content:nth-of-type(10) {
  display: block;
}

/* Vertical tabs content display */
.tabs-vertical
  input[type="radio"]:nth-of-type(1):checked
  ~ .content
  .tab-content:nth-of-type(1),
.tabs-vertical
  input[type="radio"]:nth-of-type(2):checked
  ~ .content
  .tab-content:nth-of-type(2),
.tabs-vertical
  input[type="radio"]:nth-of-type(3):checked
  ~ .content
  .tab-content:nth-of-type(3),
.tabs-vertical
  input[type="radio"]:nth-of-type(4):checked
  ~ .content
  .tab-content:nth-of-type(4),
.tabs-vertical
  input[type="radio"]:nth-of-type(5):checked
  ~ .content
  .tab-content:nth-of-type(5) {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Vertical tabs variant */
.tabs-vertical {
  display: flex;
  gap: 2rem;
}

.tabs-vertical .tab-label {
  display: block;
  border-bottom: none;
  border-left: 2px solid transparent;
  margin-bottom: 0.5rem;
}

.tabs-vertical input[type="radio"]:checked + .tab-label {
  border-left-color: var(--color-foreground);
  border-bottom-color: transparent;
}

.tabs-vertical .content {
  flex: 1;
}
