.appointment-table-section {
  gap: 0;
  padding: 0;
  overflow: visible;
}

.appointment-table-section header {
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.appointment-table-summary {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.appointment-notion-table {
  display: grid;
  min-width: 0;
  overflow: visible;
}

.appointment-table-head,
.appointment-table-row {
  display: grid;
  gap: 10px;
  align-items: center;
}

.appointment-table-head {
  min-height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: #fbfdfc;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.appointment-table-row {
  min-height: 50px;
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  background: #fff;
}

.appointment-table-row:last-child {
  border-bottom: 0;
}

.appointment-table-row:hover {
  background: #f8faf9;
}

.appointment-services-table .appointment-table-head,
.appointment-services-table .appointment-table-row {
  grid-template-columns: minmax(180px, 1fr) 92px 112px 76px;
}

.appointment-payments-table .appointment-table-head,
.appointment-payments-table .appointment-table-row {
  grid-template-columns: 120px 150px minmax(160px, 1fr) 32px;
}

.appointment-table-row.service-line {
  border-left: 4px solid var(--service-color, var(--primary));
}

.appointment-table-row strong,
.appointment-table-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-table-row input,
.appointment-table-row select {
  min-height: 36px;
  padding: 7px 8px;
}

.appointment-add-row {
  background: #fbfdfc;
}

.appointment-add-row select,
.appointment-add-row input {
  background: #fff;
}

.appointment-inline-add-row {
  min-height: 46px;
  width: 100%;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 0;
  border-top: 1px solid var(--border);
  border-bottom: 0;
  padding: 10px 14px;
  background: #fff;
  color: var(--primary);
  font: inherit;
  font-weight: 900;
  text-align: left;
}

.appointment-inline-add-row:hover {
  background: #f8faf9;
}

.service-add-edit-row .appointment-service-picker {
  grid-column: 1 / 2;
}

.appointment-empty-row {
  min-height: 44px;
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.appointment-deposit {
  padding: 0;
  overflow: hidden;
}

.appointment-deposit-summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  padding: 12px 14px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
}

.appointment-deposit-summary span:first-child {
  display: grid;
  gap: 2px;
}

.appointment-deposit-summary small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.appointment-deposit-caret {
  color: var(--primary);
  font-weight: 900;
}

.appointment-deposit.is-open .appointment-deposit-caret {
  transform: rotate(180deg);
}

.appointment-deposit-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}

.appointment-person-room-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.appointment-time-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 860px) {
  .appointment-services-table .appointment-table-head,
  .appointment-payments-table .appointment-table-head {
    display: none;
  }

  .appointment-services-table .appointment-table-row,
  .appointment-payments-table .appointment-table-row,
  .appointment-person-room-row,
  .appointment-time-row,
  .appointment-deposit-fields {
    grid-template-columns: 1fr;
  }

  .appointment-services-table .appointment-table-row,
  .appointment-payments-table .appointment-table-row {
    gap: 8px;
    align-items: stretch;
    margin: 10px;
    border: 1px solid var(--border);
    border-left-width: 4px;
    border-radius: 10px;
    padding: 10px;
  }

  .appointment-payments-table .appointment-table-row {
    border-left-color: var(--primary);
  }

  .appointment-table-row strong {
    white-space: normal;
  }

  .appointment-table-row .crud-icon-button,
  .appointment-table-row .row-actions {
    justify-self: end;
  }

  .appointment-add-row {
    background: #fbfdfc;
  }

  .appointment-inline-add-row {
    margin-top: 4px;
    border-top: 1px solid var(--border);
  }
}
