/* ==========================================================
   DIMENSIONS INDEX PAGE
   ========================================================== */

.dimensions-list-page {
  width: 100%;

  padding: 24px 20px 35px;

  box-sizing: border-box;
}

/* ==========================================================
   PAGE HEADER
   ========================================================== */

.dimensions-list-header {
  width: 50%;
  margin: 0 auto;

  min-height: 58px;

  padding: 0 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: #faf0eb;

  border: 1px solid #faf0eb;
  border-radius: 7px;

  box-sizing: border-box;
}

.dimensions-list-header-title {
  display: flex;
  align-items: center;

  gap: 9px;
}

.dimensions-list-header-icon {
  font-size: 1.05rem;

  color: #0d6efd;
}

.dimensions-list-title {
  margin: 0;

  font-size: 1rem;
  font-weight: 500;

  color: #172033;
}

/* ==========================================================
   ADD BUTTON
   ========================================================== */

.dimensions-add-button {
  min-width: 65px;
  padding: 6px 13px;
  font-size: 0.8rem;
  border-radius: 5px;
  background-color: #ff4500;
  border: none;
}
.dimensions-add-button:hover {
  transform: translateY(-2px);
  background-color: #ff4500;
  border: none;
}
.dimensions-add-button i {
  margin-right: 4px;

  font-size: 0.75rem;
}

/* ==========================================================
   TABLE CARD
   ========================================================== */

.dimensions-table-card {
  width: 50%;
  margin: 0 auto;

  margin-top: 12px;

  background: #ffffff;

  border: 1px solid #dfe4ea;
  border-radius: 7px;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

  overflow: hidden;

  box-sizing: border-box;
}

/* ==========================================================
   TABLE WRAPPER
   ========================================================== */

.dimensions-table-wrapper {
  width: 100%;

  overflow-x: auto;

  box-sizing: border-box;
}

/* ==========================================================
   TABLE
   ========================================================== */

.dimensions-table {
  width: 100%;

  min-width: 600px;

  margin: 0;

  font-size: 0.78rem;

  color: #263244;

  vertical-align: middle;

  border-collapse: separate;
  border-spacing: 0;
}

/* ==========================================================
   TABLE HEADER
   ========================================================== */

.dimensions-table thead th {
  height: 40px;

  padding: 7px 10px;

  background: #f1f4f7;

  color: #374151;

  font-size: 0.76rem;
  font-weight: 500;

  white-space: nowrap;

  border-bottom: 1px solid #dfe4ea;
}

/* ==========================================================
   TABLE BODY
   ========================================================== */

.dimensions-table tbody td {
  height: 40px;

  padding: 6px 10px;

  background: #ffffff;

  font-size: 0.77rem;

  white-space: nowrap;

  border-bottom: 1px solid #edf0f3;
}

.dimensions-table tbody tr:last-child td {
  border-bottom: none;
}

/* ==========================================================
   ROW HOVER
   ========================================================== */

.dimensions-table tbody tr:hover td {
  background: #f8fbff;
}

/* ==========================================================
   ACTION COLUMN
   ========================================================== */

.dimensions-action-column {
  width: 90px;

  text-align: center;
}

.dimensions-update-button {
  min-width: 58px;

  padding: 4px 9px;

  font-size: 0.72rem;

  line-height: 1.2;

  border-radius: 4px;
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 991.98px) {
  .dimensions-list-page {
    width: 100%;
    padding: 20px 15px 30px;
  }

  .dimensions-list-header {
    width: 100%;
    min-height: 55px;
  }

  .dimensions-table-card {
    width: 100%;
    margin-top: 10px;
  }
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 767.98px) {
  .dimensions-list-page {
    width: 100%;
    padding: 10px;
  }

  /* ========================================================
     HEADER
     ======================================================== */

  .dimensions-list-header {
    min-height: 55px;
    width: 100%;

    padding: 0 12px;
  }

  .dimensions-list-title {
    font-size: 0.92rem;
  }

  .dimensions-list-header-icon {
    font-size: 0.98rem;
  }

  .dimensions-add-button {
    min-width: 58px;

    padding: 5px 11px;
  }

  /* ========================================================
     TABLE CARD
     ======================================================== */

  .dimensions-table-card {
    width: 100%;
    margin-top: 10px;

    border: none;

    background: transparent;

    box-shadow: none;

    overflow: visible;
  }

  /* ========================================================
     REMOVE HORIZONTAL SCROLL
     ======================================================== */

  .dimensions-table-wrapper {
    overflow: visible;
  }

  /* ========================================================
     TABLE
     ======================================================== */

  .dimensions-table {
    width: 100%;

    min-width: 0;

    display: block;

    margin: 0;

    border-collapse: separate;
  }

  /* ========================================================
     HIDE TABLE HEADER
     ======================================================== */

  .dimensions-table thead {
    display: none;
  }

  /* ========================================================
     TABLE BODY
     ======================================================== */

  .dimensions-table tbody {
    display: block;

    width: 100%;
  }

  /* ========================================================
     ROW = DIMENSIONS CARD
     ======================================================== */

  .dimensions-table tbody tr {
    display: block;

    width: 100%;

    margin-bottom: 10px;

    padding: 10px 12px;

    background: #ffffff;

    border: 1px solid #dfe4ea;

    border-radius: 7px;

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);

    box-sizing: border-box;
  }

  /* ========================================================
     CELLS
     ======================================================== */

  .dimensions-table tbody td {
    width: 100%;

    height: auto;

    min-height: 32px;

    padding: 6px 0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    background: transparent;

    border-bottom: 1px solid #edf0f3;

    font-size: 0.76rem;

    white-space: normal;

    text-align: right !important;

    box-sizing: border-box;
  }

  .dimensions-table tbody tr:hover td {
    background: transparent;
  }

  /* ========================================================
     REMOVE LAST BORDER
     ======================================================== */

  .dimensions-table tbody td:last-child {
    border-bottom: none;

    padding-top: 10px;

    justify-content: flex-end;
  }

  /* ========================================================
     FIELD LABEL
     ======================================================== */

  .dimensions-table tbody td::before {
    content: attr(data-label);

    flex: 0 0 42%;

    padding-right: 10px;

    color: #5d6878;

    font-size: 0.74rem;

    font-weight: 500;

    text-align: left;
  }

  /* ========================================================
     FIELD VALUE
     ======================================================== */

  .dimensions-table tbody td:not(:last-child) {
    color: #263244;
  }

  /* ========================================================
     ACTION
     ======================================================== */

  .dimensions-table tbody td:last-child::before {
    display: none;
  }

  .dimensions-update-button {
    min-width: 72px;

    padding: 5px 12px;

    font-size: 0.74rem;

    border-radius: 4px;
  }
}

/* ==========================================================
   SMALL MOBILE
   ========================================================== */

@media (max-width: 400px) {
  .dimensions-list-header {
    padding: 0 10px;
  }

  .dimensions-list-header-title {
    gap: 7px;
  }

  .dimensions-list-title {
    font-size: 0.88rem;
  }

  .dimensions-add-button {
    min-width: 54px;

    padding: 5px 9px;

    font-size: 0.76rem;
  }

  .dimensions-table tbody tr {
    padding: 9px 10px;
  }

  .dimensions-table tbody td {
    min-height: 31px;

    font-size: 0.74rem;
  }

  .dimensions-table tbody td::before {
    flex-basis: 40%;

    font-size: 0.72rem;
  }
}
