.appointment-client-compose {
  gap: 12px;
}

.appointment-client-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.appointment-client-picker-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.appointment-client-picker-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.appointment-client-picker {
  position: relative;
}

.appointment-client-picker-shell {
  position: relative;
}

.appointment-client-trigger {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 42px 8px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.appointment-client-picker.is-open .appointment-client-trigger {
  border-color: rgba(15, 118, 110, 0.62);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.appointment-client-value {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.appointment-client-value strong,
.appointment-client-value small,
.appointment-client-placeholder {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-client-value small,
.appointment-client-placeholder {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

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

.appointment-client-clear {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: var(--panel-soft);
  color: var(--primary);
  font-weight: 900;
}

.appointment-client-options {
  position: fixed;
  z-index: 180;
  top: var(--appointment-client-top);
  left: var(--appointment-client-left);
  width: var(--appointment-client-width);
  max-height: var(--appointment-client-max-height, 340px);
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  overflow: auto;
  background: #fff;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
}

.appointment-client-options.is-above {
  transform: translateY(calc(-100% - 6px));
}

.appointment-client-search {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-bottom: 4px;
  background: #fff;
}

.appointment-client-search input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 10px;
  font: inherit;
}

.appointment-client-option,
.appointment-client-empty {
  width: 100%;
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.appointment-client-option:hover {
  background: var(--panel-soft);
}

.appointment-client-option span,
.appointment-client-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.appointment-client-tags {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.appointment-client-tag {
  min-width: 0;
  max-width: 140px;
  border: 1px solid var(--tag-color);
  border-radius: 999px;
  padding: 1px 6px;
  overflow: hidden;
  background: color-mix(in srgb, var(--tag-color) 13%, transparent);
  color: var(--tag-color);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-tags-row .crm-form-section {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
}

.appointment-new-client-button {
  min-height: 48px;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .appointment-client-line {
    grid-template-columns: 1fr;
  }

  .appointment-new-client-button {
    justify-content: center;
  }
}
