/* =========================================================
   F15.20.47 — Positions & Rates Card UI
   Presentation only. Existing edit/delete/modal logic intact.
   ========================================================= */

/* ---------- SECTION HEADER ---------- */

#attendancePayPanel #newPayRateButton {
  border-color: transparent;
  background: var(--teal-500);
  color: #fff;
  box-shadow: 0 8px 18px rgba(18,191,166,.18);
}

#attendancePayPanel #newPayRateButton:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 11px 24px rgba(18,191,166,.24);
}

/* ---------- CARD GRID ---------- */

#attendancePayRateList.attendance-pay-list,
#attendancePayRateList {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;

  width: 100% !important;
  max-height: none !important;

  overflow: visible !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  background: transparent !important;
}

/* ---------- POSITION CARD ---------- */

#attendancePayRateList .attendance-pay-item {
  position: relative;

  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;

  min-width: 0;
  min-height: 160px;

  margin: 0 !important;
  padding: 16px !important;

  border: 1px solid var(--border) !important;
  border-radius: 15px !important;

  background: var(--panel) !important;

  box-shadow:
    0 7px 18px rgba(15,23,42,.035);

  transition:
    transform .16s ease,
    border-color .16s ease,
    box-shadow .16s ease;
}

#attendancePayRateList .attendance-pay-item:first-child {
  border-top: 1px solid var(--border) !important;
}

#attendancePayRateList .attendance-pay-item:hover {
  transform: translateY(-1px);

  border-color: rgba(18,191,166,.32) !important;

  box-shadow:
    0 12px 26px rgba(15,23,42,.07);
}

/* Subtle identity strip */
#attendancePayRateList .attendance-pay-item::before {
  content: "";

  position: absolute;
  left: 16px;
  top: 16px;

  width: 34px;
  height: 4px;

  border-radius: 999px;

  background:
    linear-gradient(
      90deg,
      var(--teal-500),
      var(--blue-500)
    );
}

/* ---------- POSITION INFO ---------- */

#attendancePayRateList .attendance-pay-item > div:first-child {
  min-width: 0;

  padding-top: 13px;
  padding-right: 72px;
}

#attendancePayRateList .attendance-pay-item > div:first-child > strong {
  display: block;

  overflow: hidden;

  color: var(--text);

  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;

  text-overflow: ellipsis;
  white-space: nowrap;
}

#attendancePayRateList .attendance-pay-item > div:first-child > span {
  display: block;

  margin-top: 7px;

  color: var(--muted);

  font-size: 9px;
  font-weight: 600;
}

/* ---------- ACTIVE / INACTIVE BADGE ---------- */

#attendancePayRateList .attendance-pay-item > .settings-state {
  position: absolute;

  top: 14px;
  right: 14px;

  margin: 0;

  white-space: nowrap;
}

/* ---------- ACTIONS ---------- */

#attendancePayRateList .attendance-pay-item > .settings-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;

  width: 100%;

  margin-top: auto;
  padding-top: 14px;

  border-top: 1px solid var(--border);
}

#attendancePayRateList .settings-icon-button {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border-radius: 9px;
}

#attendancePayRateList .settings-icon-button:not(.danger):hover {
  border-color: rgba(18,191,166,.38);
  background: rgba(18,191,166,.08);
}

#attendancePayRateList .settings-icon-button.danger:hover {
  background: rgba(239,68,68,.08);
}

/* ---------- EMPTY STATE ---------- */

#attendancePayRateList > .data-empty {
  grid-column: 1 / -1;
  min-height: 130px;

  display: grid;
  place-items: center;

  border: 1px dashed var(--border);
  border-radius: 14px;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1250px) {
  #attendancePayRateList.attendance-pay-list,
  #attendancePayRateList {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  #attendancePayRateList.attendance-pay-list,
  #attendancePayRateList {
    grid-template-columns: 1fr !important;
  }

  #attendancePayRateList .attendance-pay-item {
    min-height: 145px;
  }
}
