@use "../variables";

// Divider
.divider,
.divider-vert {
  display: block;
  position: relative;

  &[data-content]::after {
    background: variables.$bg-color-light;
    color: variables.$gray-color;
    content: attr(data-content);
    display: inline-block;
    font-size: variables.$font-size-sm;
    padding: 0 variables.$unit-2;
    transform: translateY(-(variables.$font-size-sm) + variables.$border-width);
  }
}

.divider {
  border-top: variables.$border-width solid variables.$border-color-light;
  height: variables.$border-width;
  margin: variables.$unit-2 0;

  &[data-content] {
    margin: variables.$unit-4 0;
  }
}

.divider-vert {
  display: block;
  padding: variables.$unit-4;

  &::before {
    border-left: variables.$border-width solid variables.$border-color;
    bottom: variables.$unit-2;
    content: "";
    display: block;
    left: 50%;
    position: absolute;
    top: variables.$unit-2;
    transform: translateX(-50%);
  }

  &[data-content]::after {
    left: 50%;
    padding: variables.$unit-1 0;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
  }
}
