@import "./theme.css";

.react-aria-Tabs {
  display: flex;
  color: var(--text-color);

  &[data-orientation=horizontal] {
    flex-direction: column;
  }

  &[data-orientation=vertical] {
    flex-direction: row;
  }
}

.react-aria-TabList {
  display: flex;

  &[data-orientation=horizontal] {
    border-bottom: 1px solid var(--border-color);

    .react-aria-SelectionIndicator {
      left: 0;
      bottom: 0;
      width: 100%;
      border-bottom: 3px solid var(--border-color);
    }
  }

  &[data-orientation=vertical] {
    flex-direction: column;
    border-inline-end: 1px solid gray;

    .react-aria-SelectionIndicator {
      top: 0;
      right: 0;
      height: 100%;
      border-inline-end: 3px solid var(--border-color, transparent);
    }
  }
}

.react-aria-Tab {
  padding: 10px;
  cursor: default;
  outline: none;
  position: relative;
  color: var(--text-color-base);
  transition: color 200ms;
  --border-color: transparent;
  forced-color-adjust: none;

  &[data-hovered],
  &[data-focused] {
    color: var(--text-color-hover);
  }

  .react-aria-SelectionIndicator {
    position: absolute;
    transition-property: translate, width, height;
    transition-duration: 200ms;
  }

  &[data-selected] {
    --border-color: var(--highlight-background);
    color: var(--text-color);
  }

  &[data-disabled] {
    color: var(--text-color-disabled);
    &[data-selected] {
      --border-color: var(--text-color-disabled);
    }
  }

  &[data-focus-visible]:after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 4px;
    border: 2px solid var(--focus-ring-color);
  }
}

.react-aria-TabPanel {
  margin-top: 4px;
  padding: 10px;
  border-radius: 4px;
  outline: none;

  &[data-focus-visible] {
    outline: 2px solid var(--focus-ring-color);
  }
}

.react-aria-Tab[href] {
  text-decoration: none;
  cursor: pointer;
}
