/* Visit photos and notes (visit-photos.js). Colours come from the booking app's theme. */
.vp-sheet {
  width: min(560px, calc(100% - 24px)); max-height: min(88dvh, 900px); padding: 0; border: 0; border-radius: 24px;
  background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.vp-sheet::backdrop, .vp-viewer::backdrop { background: rgba(20, 12, 24, .55); }
.vp-head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 12px 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.vp-head h2 { margin: 0; font-size: 1.3rem; }
.vp-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.vp-body { padding: 14px 20px 22px; }
.vp-note { margin: 0 0 14px; color: var(--ink-2); }
.vp-error { margin: 0; color: #B3261E; }
@media (prefers-color-scheme: dark) { .vp-error { color: #FFB4AB; } }

.vp-visits { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.vp-visit { padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); }
.vp-visit-head { display: grid; gap: 2px; margin-bottom: 10px; }
.vp-visit-head strong { font: 600 1.05rem var(--sans); }
.vp-visit-head small { color: var(--ink-2); font-size: .95rem; }
.vp-visit-photos .vp-note { margin: 0; }

.vp-side + .vp-side { margin-top: 12px; }
.vp-side-label { margin: 0 0 6px; font: 600 .95rem var(--sans); color: var(--ink); }
.vp-side-label span { color: var(--ink-2); font-weight: 500; }
.vp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.vp-thumb, .vp-add {
  aspect-ratio: 1; border-radius: 14px; overflow: hidden; padding: 0; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
}
.vp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vp-add {
  position: relative; display: grid; place-content: center; justify-items: center; gap: 2px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--accent);
}
.vp-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.vp-add span { font-size: 1.8rem; line-height: 1; }
.vp-add small { font: 500 .8rem var(--sans); }
.vp-add.is-busy { opacity: .6; pointer-events: none; }
.vp-none { margin: 0; color: var(--ink-2); font-size: .95rem; }

.vp-viewer { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, .92); }
.vp-viewer[open] { display: grid; grid-template-rows: 1fr auto; }
.vp-viewer img { width: 100%; height: 100%; object-fit: contain; min-height: 0; padding: env(safe-area-inset-top) 0 0; }
.vp-viewer-bar { display: flex; justify-content: center; gap: 12px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
.vp-viewer-bar button { min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font: 600 1rem var(--sans); cursor: pointer; }
.vp-done { background: #fff; color: #111; }
.vp-remove { background: rgba(255, 255, 255, .14); color: #fff; }

/* Entry points: a button on the app's salon page and a card above My visits' list */
.vp-visits-entry { margin: 0 0 14px; }
.vp-entry-card {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 12px 16px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); color: var(--ink);
}
.vp-entry-icon { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.vp-entry-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.vp-entry-text { display: grid; gap: 1px; }
.vp-entry-text strong { font: 600 1.05rem var(--sans); }
.vp-entry-text small { font: 400 .95rem var(--sans); color: var(--ink-2); }
.home-act.vp-entry { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.home-act.vp-entry .vp-entry-icon { width: 46px; height: 46px; }

/* Staff: the appointment details */
[data-vp-staff] { margin: 6px 0 4px; }
[data-vp-staff] .vp-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }

/* Notes on a visit: a short thread with the nail tech, and a box to write the next one */
.vp-notes { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.vp-thread { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.vp-msg { max-width: 86%; justify-self: start; padding: 8px 12px; border-radius: 16px 16px 16px 6px; background: var(--surface); border: 1px solid var(--line); }
.vp-msg.is-mine { justify-self: end; border-radius: 16px 16px 6px 16px; background: var(--accent-soft); border-color: transparent; }
.vp-msg small { display: block; font: 500 .8rem var(--sans); color: var(--ink-2); }
.vp-msg p { margin: 2px 0 0; font: 400 1rem/1.4 var(--sans); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.vp-note-form { display: flex; align-items: flex-end; gap: 8px; }
.vp-note-form textarea {
  flex: 1; min-width: 0; min-height: 46px; max-height: 140px; padding: 11px 14px; resize: none; field-sizing: content;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); font: 400 1rem/1.35 var(--sans);
}
.vp-note-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.vp-send { flex: none; min-height: 46px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 1rem var(--sans); cursor: pointer; }
.vp-send:disabled { opacity: .55; }
