/* ==========================================================================
   responsive-table.css — Shared base for every responsive table.
   Holds the container, rows, header, cells and state colours common to all
   tables. Per-screen column widths and extras live in the table-*.css variants
   loaded alongside this base.
   Modifiers: --4cols-home / --4cols-accounts / --5cols / --8cols.
   ========================================================================== */

.responsive-table {
  padding: 0;
  list-style-type: none;
  border-radius: 5px;
  background-color: #f5f5f5;

  li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 20px;
    margin-bottom: 5px;
    padding: 10px;
    border-radius: 5px;

    &:last-child {
      margin-bottom: 0;
    }
  }

  .table-header {
    background-color: #95a5a6;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .table-row {
    position: relative;
    z-index: 1;
    background-color: #ffffff;
    box-shadow: 0px 0px 9px 0px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, width 0.3s ease 0.1s;

    &:hover {
      background-color: #f5f5f5;
    }

    &[style*="transform"] {
      z-index: 10;
    }
  }

  .col {
    overflow: hidden;
    max-width: 100%;
    width: fit-content;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .selected {
    background-color: #aae78e !important;
  }

  .to-delete {
    background-color: #ff9b9b !important;
  }
}

/* --- Responsive — shared -------------------------------------------------- */
@media all and (max-width: 767px) {
  .responsive-table {
    position: relative;

    li {
      height: 5px;
    }

    .editing-row {
      flex-wrap: wrap;
      height: auto;
    }
  }
}
