/* Paid walk payments */
.payments-page {
  max-width: 1680px;
  width: min(1680px, 98vw);
}

.payment-layout {
  grid-template-columns: minmax(320px, .45fr) minmax(0, 1fr);
  align-items: start;
}

.paid-walks-panel {
  position: sticky;
  top: 18px;
}

.paid-walk-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.paid-walk-card {
  width: 100%;
  display: grid;
  gap: 7px;
  text-align: left;
  padding: 14px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(16,24,40,.04);
}

.paid-walk-card:hover,
.paid-walk-card.is-active {
  border-color: rgba(28,124,84,.30);
  background:
    radial-gradient(circle at 100% 0%, rgba(28,124,84,.10), transparent 32%),
    #fff;
}

.paid-walk-card strong,
.paid-walk-card small,
.paid-walk-card b,
.paid-walk-card em {
  display: block;
}

.paid-walk-card strong {
  color: #0f172a;
  font-size: .98rem;
}

.paid-walk-card small,
.paid-walk-card em {
  color: #64748b;
  font-weight: 800;
  font-style: normal;
}

.paid-walk-card b {
  color: #b45309;
  font-size: 1.05rem;
}

.payment-table-panel .section-head {
  align-items: end;
}

.payments-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.payments-mini-stats span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 11px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-weight: 900;
}

.payments-mini-stats strong {
  color: #0f172a;
}

.payments-table {
  min-width: 1050px;
}

.member-cell {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.member-cell .avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #ecfdf3;
  color: #0f7f55;
  font-weight: 1000;
}

.member-cell strong,
.member-cell small {
  display: block;
}

.member-cell small {
  color: #64748b;
  font-size: .78rem;
  margin-top: 2px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.payment-modal-card {
  width: min(780px, 94vw);
}

.payment-modal-card .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-danger {
  background: #dc2626 !important;
  color: #fff !important;
}

.pill-orange {
  background: #fff7ed !important;
  color: #b45309 !important;
  border: 1px solid rgba(245,158,11,.25) !important;
}

@media (max-width: 1100px) {
  .payment-layout {
    grid-template-columns: 1fr;
  }

  .paid-walks-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .payment-table-panel .section-head {
    display: grid;
    gap: 12px;
  }

  .payment-table-panel .inline-controls {
    display: grid;
    width: 100%;
  }

  .payment-modal-card .modal-actions {
    display: grid;
  }

  .payment-modal-card .modal-actions .btn {
    width: 100%;
  }
}


/* Payment modal hard fix */
.payment-modal-backdrop,
.modal#paymentModal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(8px);
}

.payment-modal-backdrop[hidden],
.modal#paymentModal[hidden] {
  display: none !important;
}

.payment-modal-backdrop .modal-card,
.modal#paymentModal .modal-card {
  max-height: min(88vh, 920px);
  overflow: auto;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .30);
}

body.modal-open {
  overflow: hidden;
}


/* dd/mm/yyyy payment date fields */
.payment-date-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.payment-date-grid input[type="text"],
.payment-date-grid input[type="time"] {
  min-height: 44px;
}

.payment-date-grid small.muted {
  font-weight: 700;
}

@media (max-width: 980px) {
  .payment-date-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .payment-date-grid {
    grid-template-columns: 1fr;
  }
}


/* Pro payment date picker with calendar icon */
.payment-date-picker-field {
  position: relative;
}

.payment-date-picker-field input[type="text"] {
  width: 100%;
  padding-right: 48px;
}

.native-payment-date {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 34px;
  height: 34px;
  opacity: 0;
  pointer-events: none;
}

.payment-calendar-btn {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.payment-calendar-btn svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.payment-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

@media print {
  body:not(.printing-receipt) .payment-modal-backdrop,
  body:not(.printing-receipt) .payments-page {
    display: none !important;
  }
}
