/*------------------------------------------------------------
ACCOUNT
Dashboard, infos perso, mot de passe, carnet d'adresse
====================================*/

.account-container {
  margin-bottom: 3rem;
}

// Listing order
.order-list-wrapper {
  th {
    @extend .title-label;
    a {
      display: flex;
      justify-content: space-between;
      text-decoration: none;
      color: inherit;
    }
  }
  td {
    vertical-align: middle;
  }
  .price {
    color: $dark;
  }
  .btn {
    display: block;
    & + .btn {
      margin-top: 1rem;
    }
  }
}

// Detail order
.order-show-header {
  .order-completed-at {
    display: block;
    margin-bottom: 1rem;
  }
}
.account-container {
  .order-container {
    margin-bottom: 3rem;
  }
}
.order-invoices-wrapper {
  td {
    vertical-align: middle;
  }
}

/* RESPONSIVE */
/***************************************/
@include media-breakpoint-down(sm) {
  .account-navigation {
    .btn {
      display: block;
      padding: $btn-padding-y 1rem;
      margin-top: 2rem;
    }
  }

  // Listing order
  .order-list-wrapper {
    .table {
      border: $table-border-width solid $table-border-color;
      thead {
        display: none;
      }
      tbody {
        tr {
          display: grid;
          & + tr {
            border-top: $table-border-width solid $table-border-color;
          }
        }
        td {
          border: none;
          &:nth-child(1) { // N° Cmd
            grid-column: 1/3;
            grid-row: 1;
          }
          &:nth-child(2) { //Date
            grid-column: 3/4;
            grid-row: 1;
            text-align: right;
          }
          &:nth-child(3) { // Expédié à
            grid-column: 1;
            grid-row: 3;
            padding-top: 0;
            padding-bottom: 0;
          }
          &:nth-child(4) { // Prix
            grid-column: 2/4;
            grid-row: 2;
            padding-top: 0;
            text-align: right;
          }
          &:nth-child(5) { // Etat
            grid-column: 1/4;
            grid-row: 2;
            padding-top: 0;
          }
          &:nth-child(6) { // Action
            grid-column: 1/4;
            grid-row: 4;
          }
        }
      }
    }
  }

  // Detail order
  .order-show-header {
    .btn {
      display: block;
      margin-bottom: 2.5rem;
    }
  }
  .order-invoices-wrapper {
    tr {
      display: flex;
      flex-wrap: wrap;
      width: 100%;
    }
    .cell-number {
      flex: 1;
    }
    thead {
      .cell-actions {
        display: none;
      }
    }
    tbody {
      td:not(.cell-actions) {
        padding-bottom: 0;
        border-bottom: 0;
      }
      .cell-actions {
        flex: 100%;
      }
      .btn {
        display: block;
      }
    }
  }
}
@include media-breakpoint-up(md) {
  .account-container {
    margin-bottom: 5rem;
  }
  .account-navigation {
    margin-top: 4rem;
  }

  // Listing order
  .order-list-wrapper {
    tbody {
      td {
        &:nth-child(3) { // Expédié à
          width: 100%;
        }
        &:nth-child(4) { // Prix
          text-align: right;
        }
        &:nth-child(6) { // Action
          width: 0.1rem;
          white-space: nowrap;
        }
      }
    }
  }
}
@include media-breakpoint-up(lg) {
  // Listing order
  .order-list-wrapper {
    .btn {
      display: inline-block;
      width: auto;
      & + .btn {
        margin-top: 0;
        margin-left: 1rem;
      }
    }
  }
}
