@import '~@angular/material/theming';
@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';

@include mat-core();

$custom-primary: mat-palette($mat-indigo, 900);
$custom-secondary: mat-palette($mat-orange, 500);
$custom-theme: mat-light-theme($custom-primary, $custom-secondary);

$primaryColor: #0C1863;

* {
  font-family: 'Roboto', sans-serif;
}

a, .cp {
  cursor: pointer;
}

.mat-drawer-container {
  overflow: visible !important;
  width: 50%;
}

.sidenav-container mat-sidenav {
  width: 250px;
}

.sidenav-container {

  .mat-list-item-content {
    cursor: pointer;

  }

  .menu-btn {
    width: 100%;
    text-align: left;
  }
}

.menu-btn {
  background-color: $primaryColor;
}

.login .mat-form-field-infix {
  width: 220px;
}

.search {
  .mat-form-field-infix {
    border-top: 0;
  }
}

.product-wrapper {
  .mat-form-field-infix {
    width: 140px !important;
  }
}


.btn-action {
  min-width: 55px !important;

  &__text {
    @media screen and (max-width: 520px ) {
      display: none;
    }
  }

  @media screen and (max-width: 520px ) {
    min-width: 0 !important;
    width: 30px;
    height: 30px;
    position: relative;

    &__icon {
      font-size: 18px !important;
      height: 18px !important;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);

    }
  }
}


.table-wrapper {
  margin: 20px auto;
  max-width: 900px;
  width: 100%;

  @media screen and (max-width: 520px) {
    overflow-x: auto;

    .mat-table {
      display: table;
      table-layout: fixed;
      width: auto;
    }

    .mat-row, .mat-header-row {
      display: table-row;

      .mat-cell, .mat-header-cell {
        &:first-child {
          width: 60%;
          min-width: 100px;
        }
      }
    }

    .mat-cell, .mat-header-cell {
      display: table-cell;
      padding: 6px;
      border-bottom: 1px solid rgba(0, 0, 0, 0.12);
      vertical-align: middle;
    }

    .mat-header-cell {
      padding: 12px 24px;
    }
  }

  .products-list {
    .mat-header-row {
      .mat-header-cell {
        flex-basis: auto;

        &:first-child {
          width: 50%;
        }

        &:not(:first-child) {
          text-align: center;
          width: 25%;
        }
      }
    }

    .mat-row {
      .mat-cell {
        flex-basis: auto;
        font-size: 18px;

        @media screen and (max-width: 520px) {
          font-size: 13px;
        }

        &:first-child {
          //cursor: pointer;
          width: 50%;
        }

        &:not(:first-child) {
          text-align: right;
          width: 30%;
        }

        &:last-child {
          width: 15% !important;
        }
      }
    }

    &--with-links {

      .mat-row .mat-cell:first-child {
        cursor: pointer;
      }
    }

  }
}

.input-underline {
  text-decoration: underline;
}


.flex-count-buttons {
  justify-content: flex-end;

  > button {
    width: 25px;
    height: 25px;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 10px;
  }

  > input {
    width: calc(100% - 50px);
    margin-left: 10px;
    margin-right: 10px;
    max-width: 110px;
    text-align: center;
    border-style: solid;
    border-color: $primaryColor;
  }
}

.icon-centered {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 15px !important;
  height: 15px !important;
  font-size: 15px !important;
}

.flex-row {
  display: flex;
}

@media screen and (max-width: 520px) {
  .mat-form-field {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@include angular-material-theme($custom-theme);

.search-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 50px 0;
}

.search {
  display: flex;
  flex-wrap: wrap;

  &__label {
    font-size: 20px;
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    box-sizing: border-box;
    padding: 0 10px;
  }

  &__controls {
    display: flex;
    width: 100%;
    justify-content: center;
  }

  &__input {
    width: 340px;
    box-sizing: border-box;
    padding: 0 10px;
  }

  &__btn {
    width: 110px;
    padding: 0 10px;
    box-sizing: border-box;
  }
}

@media screen and (max-width: 460px) {
  .search {

    &__label {
      font-size: 16px;
    }

    &__input {
      width: calc(100% - 110px);
    }
  }
}