@import './dark';
@import './card-add';
@import './probably-useless';
@import '../../styles/colors';

.card {
  padding: 25px;
  border-radius: 20px;

  &.row {
    .card-title-and-content-container {
      display: flex;
      align-items: center;
    }

    .card-main-container {
      display: flex;
      align-items: center;

      >div {
        width: 100%;
        padding: 0px 10px;
      }
    }

    .options {
      display: none;
    }

    .card-parameters-grid {
      display: flex;
      align-items: center;

      >div {
        padding: 0px 10px;
        min-width: 150px;
      }
    }

    .users {
      flex-wrap: unset;
    }

    .card-divider {
      display: none;
    }
  }
}

.card-divider {
  /* display: table-row; */
  /* padding: 5px 0px; */
  height: 1px;
  /* padding: 5px 0px; */
  /* margin-bottom: 10px; */
}

.card-parameters-grid {
  display: table;
  width: 100%;

  .card-divider {
    display: table-row;
  }

  .card-text-parameter {
    display: table-row;

    /* &:first-child {
      .card-parameter-children {
        padding-top: 0px;
      }
    }

    &:last-child {
      .card-parameter-children {
        padding-bottom: 0px;
      } */
    /* } */
  }

  .card-text-parameter-icon {
    display: flex;
    align-items: center;
  }

  .card-parameter-children {
    display: table-cell;
    text-align: left;
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    /* padding-bottom: 20px; */
    vertical-align: middle;
    /* height: 40px; */
    padding: 6px 0px;
    padding-right: 5px;
  }

  .square-card-parameter-icon-container {
    display: table-cell;
    padding-right: 15px;
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
  }

  .card-text-parameter-counter {
    display: table-cell;
    text-align: right;
    vertical-align: middle;
  }

}

.card_big .options {
  position: absolute;
  top: 0;
  right: 0;
}

.options {
  .MuiIconButton-root {
    padding: 0px;
  }
}

.card .options__dropdown {
  width: 268px;
}

.card__team {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  margin-bottom: 8px;
  padding-right: 35px;
}

.card__team .options {
  position: absolute;
  top: 0;
  right: 0;
}

.card__team .card__logo {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  margin-right: 11px;
  max-width: 52px;
  max-height: 52px;
  /* border-radius: 10px; */
  overflow: hidden;
  font-size: 0;
}

.card__team .card__pic {
  max-width: 100%;
  max-height: 100%;
}

.card__pic {
  width: 100%;
  border-radius: 11px;
}

.card__title {
  display: block;
  -webkit-transition: opacity .25s;
  -o-transition: opacity .25s;
  transition: opacity .25s;
}

.card__title:hover {
  // opacity: .8;
}

.card__title_done {
  text-decoration: line-through;
}

.card__head .card__title {}

.card_big .card__title {
  overflow: hidden;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card_big .card__scale {
  margin-bottom: 20px;
}

.card {
  &.card_big .card__head {
    position: relative;
    margin-bottom: 20px;
    padding-right: 44px;
  }
  &.row {
    &.card_big .card__head {
      margin-bottom: 0px;
      padding-right: 20px;
    }
  }
}


.card_big .card__parameters {
  margin-bottom: 24px;
}

.card__parameters {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  height: 26px;
}

.card__parameter {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  color: $primary-dark-gray-color;
}

.card-main-container {
  box-sizing: border-box;
  width: 100%;
}

.card-text-parameter {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  /* margin-bottom: 10px; */
  justify-content: space-between;
  box-sizing: border-box;
  padding: 5px 0;

  .square-card-icon-and-text-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    flex: 4;
    box-sizing: border-box;
    max-width: 95%;

    .square-card-parameter-icon-container {
      display: flex;
      align-content: center;
      max-width: 25px;
      max-height: 20px;
      margin-right: 10px;

      .card-text-parameter-icon {
        margin-right: 20px;
        height: 18px;
        display: flex;
        align-items: center;
      }
    }

    .card-text-parameter-text {
      padding-right: 10px;
    }
  }

  .card-text-parameter-counter {
    /* flex: 1; */
  }
}

.card__parameter .icon {
  margin-right: 5px;
  font-size: 14px;
  fill: $primary-dark-gray-color;
}

.card__parameter:not(:last-child) {
  margin-right: 15px;
}

.card__parameter.card__parameter_time {
  padding: 4px 6px;
  border-radius: 5px;
  background: $gray-color;
}

.card__parameter.card__parameter_time.orange {
  background: rgba(255, 151, 74, 0.1);
  color: #FF974A;
}

.card__parameter.card__parameter_time.orange .icon {
  fill: #FF974A;
}

.card__parameter.card__parameter_time.red {
  background: rgba(252, 90, 90, 0.1);
  color: $primary-red-color;
}

.card__parameter.card__parameter_time.red .icon {
  fill: $primary-red-color;
}

.card__percent {
  margin-bottom: 5px;
  text-align: right;
}

.card_right {
  display: flex;
  flex-direction: row;
}

.card__line {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 2px;
}

.card__progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  border-radius: 2px;
}

@media only screen and (max-width: 767px) {
  .card__team {
    padding: 0;
  }

  .card__team .card__logo {
    max-width: 40px;
    max-height: 40px;
  }

  .card_big .card__head {
    padding-right: 0;
  }
}

@media only screen and (max-width: 1365px) {
  .card_big .card__title {
    font-size: 14px;
  }

  .card_big .card__info {
    font-size: 14px;
  }

  .card_big .card__parameters {
    margin-bottom: 15px;
  }

  .card_big .card__scale {
    margin-bottom: 15px;
  }
}

@media only screen and (max-width: 1599px) {
  .card {
    .card_big .card__head {
      margin-bottom: 15px;
  
      &.row {
        margin-bottom: 0px;
      }
    }
  }

  .card_big .card__parameters {
    margin-bottom: 18px;
  }
}