@if (get("vaadin.element.tab.status")) {
  @each $size, $value in get("element.tab.size") {
    .v-tabsheet.#{$size}, %v-tabsheet-#{$size} {
      .v-tabsheet-tabcontainer {
        table.v-tabsheet-tabs {
          margin: get("element.tab.size."+$size+".margin");

          td.v-tabsheet-tabitemcell {
            .v-caption {
              border-radius: size(get("element.tab.size."+$size+".height")/2);
              height: size(get("element.tab.size."+$size+".height"));
              line-height: size(get("element.tab.size."+$size+".height"));
              padding: size(get("vaadin.element.tab.size."+$size+".padding.top")) size(get("vaadin.element.tab.size."+$size+".padding.right"));

              .v-captiontext {
                font-size: size(get("element.tab.size."+$size+".font-size"));
                font-weight: 700;
              }
            }
          }
        }
      }
    }
  }

  @each $color, $value in get("element.tab.color") {
    .v-tabsheet.#{$color}, %v-tabsheet-#{$color} {
      .v-tabsheet-tabcontainer {
        table.v-tabsheet-tabs {
          td.v-tabsheet-tabitemcell {
            &.v-tabsheet-tabitemcell-selected {
              .v-caption {
                color: var(--white);
                background-color: var(--secondary-900);

                .v-captiontext {
                  color: var(--white);
                }
              }
            }
          }
        }

        .v-tabsheet-scroller {
          button.v-tabsheet-scrollerPrev, button.v-tabsheet-scrollerNext {
            &:hover {
              color: var(--#{$color}-#{$value});
            }
          }
        }
      }
    }
  }

  .v-tabsheet {
    .v-tabsheet-tabcontainer {
      &::before {
        display: none;
      }

      display: flex;
      align-items: flex-start;
      justify-content: flex-start !important;
      background-color: var(--white);
      box-shadow: unquote(get("element.tab.shadow"));

      table.v-tabsheet-tabs {
        td.v-tabsheet-tabitemcell {
          &:not(:first-child) {
            .v-tabsheet-tabitem {
              margin-left: size(get("element.tab.margin"));
            }
          }

          .v-tabsheet-tabitem {
            .v-caption {
              border: none;
              display: flex;
              align-items: center;
              justify-content: flex-start;
              margin: 0;
              background-color: transparent;
              color: var(--secondary-900);
              font-weight: 700;

              .v-captiontext {
                padding-bottom: 0;
                color: var(--secondary-900);
              }

              .v-tabsheet-caption-close {
                position: static;
                color: var(--secondary-900);
                font-size: size(get("element.tab.close.font-size"));
                background-color: transparent;
                margin: 0;
              }
            }
          }

          &.v-tabsheet-tabitemcell-selected {
            .v-caption {
              color: var(--white);
              background-color: var(--secondary-900) !important;

              .v-captiontext {
                color: var(--white);
              }

              .v-tabsheet-caption-close {
                color: var(--white);
              }
            }
          }
        }
      }

      .v-tabsheet-scroller {
        &::after {
          display: none;
        }

        button.v-tabsheet-scrollerPrev, button.v-tabsheet-scrollerNext {
          color: var(--secondary-700);

          &:active {
            opacity: 1;
          }
        }
      }
    }

    .v-tabsheet-content {
      border: none !important;

      .v-tabsheet-tabsheetpanel {
        background-color: transparent;
      }
    }

    @extend %v-tabsheet-medium;
    @extend %v-tabsheet-secondary;
  }
}

.lbs-tabpane {
  > .v-tabsheet-content {
    > .v-tabsheet-tabsheetpanel {
      > .v-scrollable {
        > .lbs-pane {
          > .container {
            > .row:first-child {
              > [class*="col-"] {
                > .lbs-tabpane {
                  > .v-tabsheet-tabcontainer {
                    box-shadow: none !important;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
