/* modules/clients/clientsView.css — client directory cards + client detail layout (profile,
   avatar, weight-history chart). Extracted from index.css to live next to clientsView.js. */

/* The "no clients" placeholder (clientsDirectory.js) spans the whole #clients-list grid instead of
   landing in its first column. */
.clients-empty-state {
  grid-column: 1 / -1;
}

.client-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.client-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
}
.client-info-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
/* A name or a goal with no space in it breaks inside its card instead of widening the card (and with
   it every other card in the grid). */
.client-card {
  min-width: 0;
}
.client-name-meta {
  min-width: 0;
}
.client-name-meta h3,
.client-name-meta p {
  overflow-wrap: anywhere;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.client-name-meta h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}
.client-name-meta p {
  font-size: 12px;
} /* Client Detail Layout */
.client-detail-card {
  margin-bottom: 20px;
}
.client-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 22px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.profile-meta h3 {
  font-family: var(--font-header);
  font-size: 20px;
  font-weight: 700;
}
.profile-meta p {
  font-size: 12px;
}
.profile-info-grid {
  gap: 12px;
  margin-bottom: 16px;
}
.info-block label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-bottom: 4px;
  display: block;
}
.info-block p {
  font-size: 14px;
  line-height: 1.5;
  /* A note typed on three lines is read on three lines: joined, "Dolg 120 €" ran into the next
     thing the trainer wrote (trainer weeks, 2026-10-10). */
  white-space: pre-line;
}
.quick-workout-action {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* Required, not redundant: `display: flex` above outranks the UA stylesheet's `[hidden]` rule, so
   without this the hidden attribute silently does nothing — and what it hides here is every action
   on an erased client's page. */
.quick-workout-action[hidden] {
  display: none;
}
.quick-workout-action > .btn {
  flex: 1;
  min-width: 150px;
}
/* The consent e-mail is a mailto: link wearing the button's look. */
.quick-workout-action > a.btn {
  text-decoration: none;
  text-align: center;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}
.data-table th,
.data-table td {
  padding: 8px 12px;
  text-align: left;
}
.data-table th {
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
}
.data-table td {
  border-bottom: 1px dashed var(--border-color);
}
.data-table tr:last-child td {
  border-bottom: none;
} /* Weight History Chart Box */
.simple-chart {
  height: 100px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
  position: relative;
}
.chart-bar-wrapper {
  flex: 1;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.chart-bar {
  width: 100%;
  background: linear-gradient(to top, var(--primary-hover), var(--primary));
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.4s ease;
  position: relative;
}
.chart-bar:hover .chart-tooltip {
  opacity: 1;
}
.chart-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -6px);
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--primary);
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  z-index: 10;
}
.chart-label {
  font-size: 9px;
  margin-top: 4px;
}

/* --- GDPR consent block (Add/Edit Client dialog, clientConsentSection.js) --- */
.consent-fieldset {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}
.consent-fieldset legend {
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.consent-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}
.consent-checkbox label {
  margin-bottom: 0;
  font-weight: normal;
  cursor: pointer;
}
.consent-date-group[hidden] {
  display: none;
}
.consent-meta {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
/* Wraps rather than scrolls: three controls at a thumb-sized height do not fit one phone row. */
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.consent-actions .btn {
  flex: 1 1 auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.consent-actions .btn.disabled,
#btn-send-consent-email.disabled {
  pointer-events: none;
  opacity: 0.5;
}
.consent-info-body p {
  line-height: 1.5;
}

/* --- Data-subject request dialogs (clientDataRights.js) --- */
.data-rights-body {
  max-height: 60vh;
  overflow-y: auto;
}
/* The one line that must be read before a destructive action: who this is about. */
.data-rights-subject {
  font-weight: 700;
  margin-bottom: 4px;
}
.data-rights-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.data-rights-warning {
  font-size: 12px;
  line-height: 1.5;
  color: var(--warning, #b45309);
  border-left: 3px solid var(--warning, #b45309);
  padding: 6px 10px;
  margin: 8px 0;
  background: color-mix(in srgb, var(--warning, #b45309) 8%, transparent);
  border-radius: 4px;
}
.data-rights-passphrase-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.data-rights-passphrase-row input {
  flex: 1 1 200px;
  font-family: var(--font-mono);
}
.data-rights-steps {
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 18px;
  line-height: 1.6;
}
/* Wraps: four actions at a thumb-sized height do not fit one phone row. */
.data-rights-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.data-rights-actions .btn {
  flex: 1 1 auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.data-rights-actions .btn.disabled {
  pointer-events: none;
  opacity: 0.5;
}
.btn.danger-btn {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
.btn.danger-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.data-rights-receipt {
  margin-top: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}
.data-rights-done {
  font-weight: 700;
  color: var(--success, #059669);
}
.data-rights-checklist {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
}
.data-rights-checklist li {
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: var(--input-bg);
}
.data-rights-checklist li.todo {
  border-left: 3px solid var(--warning, #b45309);
}
.data-rights-checklist li.info {
  border-left: 3px solid var(--border-color);
}
.data-rights-checklist .why {
  color: var(--text-muted);
  font-size: 11px;
}
.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 4px 0 0;
}
/* The decrypted export, rendered as text — never as markup: it arrived from outside the app. */
.data-rights-output {
  margin-top: 12px;
  padding: 10px;
  background: var(--input-bg);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.5;
  max-height: 40vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Reviewing a submission a client sent in (signupReviewDialog.js). Lives with the client
   styles because what it produces is a client record; the person using it is the trainer. */
.signup-review-lede {
  margin: 0 0 14px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* A definition list, not a table: this is one record read top to bottom on a phone, and a two-column
   table at 390px puts the client's own words in a 90px gutter. */
.signup-review-fields {
  margin: 14px 0 0 0;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md, 12px);
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.signup-review-fields dt {
  margin-top: 10px;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.signup-review-fields dt:first-child {
  margin-top: 0;
}

.signup-review-fields dd {
  margin: 2px 0 0 0;
  color: var(--text-main);
  line-height: 1.4;
  /* A stranger's free text, so it must wrap rather than stretch the dialog off screen. */
  overflow-wrap: anywhere;
}

.signup-review-status {
  margin: 12px 0 0 0;
  padding: 10px 12px;
  border-radius: var(--border-radius-md, 12px);
  font-size: 0.88rem;
  line-height: 1.4;
  background: var(--border-color);
  color: var(--text-main);
}

.signup-review-status.is-error {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
}

.signup-review-match {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent);
  border-radius: var(--border-radius-md, 12px);
}

/* The whole sentence is the target — deciding "same person or new person" is the one judgement in this
   dialog, and it should not hinge on hitting a 16px box. */
.signup-review-match-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
  cursor: pointer;
}

.signup-review-match-row input {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

/* The invitation as a code on the trainer's own screen. Black on white whatever the
   theme is: this is a picture for somebody else's camera, and a themed ground turns a symbol a
   phone reads in one pass into one it hunts for. The white padding is the quiet zone's paper. */
/* The language choice is tapped like the contact field under it, at every width: the shared 44px
   minimum for fields applies only on narrow screens, and a select is drawn two pixels shorter than
   an input with the same padding. */
#dialog-intake-invite select.form-control {
  min-height: 44px;
}

.intake-invite-actions .btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}
.intake-invite-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.intake-invite-qr-svg {
  /* Big enough to scan at arm's length, and never taller than the dialog it sits in. */
  width: min(280px, 70vw);
  height: auto;
  padding: 10px;
  border-radius: var(--border-radius-md);
  background: #fff;
}

.intake-invite-qr-svg path {
  fill: #000;
}

.intake-invite-qr .text-sm {
  margin: 0;
  text-align: center;
}
