/**
 * Nav
 */

nav {
  margin-bottom: var(--space-md);
}

/* Basic horizontal Navigation */
nav.ds-nav,
nav.ds-nav-vertical {
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 0;
  white-space: nowrap;

  & input {
    width: inherit;
  }

  & a,
  & [role="link"],
  & button,
  & [role="button"] {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-start;
    font-size: 1rem;
    font-weight: 570;
    line-height: 1.12;
    letter-spacing: 0.02rem;
    color: var(--color);
    padding: var(--space);
    border: none;
    border-radius: 0;
    height: auto;
    transition: background-size 0.3s;
    background: linear-gradient(0deg, var(--link), var(--link)) no-repeat left bottom / 0% 8%;

    &.active {
      background: linear-gradient(0deg, var(--highlight), var(--highlight)) no-repeat left bottom / 100% 8%;
    }

    &:hover,
    &:active {
      background: linear-gradient(0deg, var(--link), var(--link)) no-repeat left bottom / 100% 8%;
      color: var(--color);
    }
  }
}

/* Vertical Nav */
nav.ds-nav-vertical {
  flex-flow: column nowrap;
  align-items: stretch;
  border-bottom: solid 1px var(--border-color);

  & > * {
    border-top: solid 1px var(--border-color);
  }
}

/* Horisontal line after `nav` */
nav.ds-nav + hr {
  margin-top: 0;
}

/* Tool bar nav */
nav.ds-nav-tools,
aside.ds-nav-tools {
  
  & .ds-button-group {
    border-radius: var(--space-lg);
    border: solid var(--space-xs) var(--card-border-color);
  }

  & hr {
    display: block;
    border: none;
    background-color: var(--card-border-color);
    width: 1px;
    height: var(--button-base-height);
    margin: 0;
  }

  &.vertical {

    & .ds-button-group {
      flex-flow: column nowrap;

      & hr {
        width: var(--button-base-height);
        height: 1px;
      }

      & > button,
      & > input,
      & > a {

        width: auto;

        &:first-child {
          border-radius: var(--space-lg) var(--space-lg) 0 0;  
        }

        &:last-child {
          border-radius: 0 0 var(--space-lg) var(--space-lg);
        }

        &[title]:first-child {
          padding-top: var(--space-xs);
          padding-left: 0;
        }
    
        &[title]:last-child {
          padding-bottom: var(--space-xs);
          padding-right: 0;
        }
      }
    }
  }
}