/* DYHIA — shared form components (public account area + back office): see assets/js/ui.js. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Searchable location selects */
.geo-search { position: relative; margin-bottom: 6px; }
.geo-search input { width: 100%; padding: 8px 12px; border: 1px solid var(--line, #e3e8ee); border-radius: 8px; font: inherit; font-size: 16px; background: #fbfcfd; }
.geo-search input:focus { outline: 2px solid var(--gold, #c8a24a); outline-offset: 1px; background: #fff; }
.geo-hint { display: block; min-height: 0; font-size: 12px; color: var(--muted, #6b7785); margin-top: 2px; }
.geo-hint.none { color: var(--red, #c0392b); }

/* Busy forms (double-submit guard) */
form.is-busy button.is-busy, form.is-busy input.is-busy { opacity: .65; cursor: progress; pointer-events: none; }

/* Device-only draft notice */
.draft-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 14px; border-radius: 8px; background: #fff7e6; border: 1px solid #f1d9a6; font-size: 14px; }
.draft-bar span { flex: 1 1 220px; }

/* Toasts */
.ui-toasts { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.ui-toast { padding: 10px 14px; border-radius: 8px; color: #fff; background: var(--navy, #0f2a3d); box-shadow: 0 6px 20px rgba(0,0,0,.18); font-size: 14px; transition: opacity .35s, transform .35s; }
.ui-toast-success { background: var(--green, #1f8a5b); }
.ui-toast-error { background: var(--red, #c0392b); }
.ui-toast.out { opacity: 0; transform: translateY(8px); }

/* Photo manager */
.photo-manager.pm-js [data-photo-fallback] { display: none; }
.pm-grid { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pm-grid:empty { display: none; }
.pm-item { position: relative; border: 1px solid var(--line, #e3e8ee); border-radius: 10px; overflow: hidden; background: #f4f6f9; aspect-ratio: 4 / 3; }
.pm-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-item.is-cover { outline: 3px solid var(--gold, #c8a24a); outline-offset: -3px; }
.pm-item.is-internal img { opacity: .55; }
.pm-item.dragging { opacity: .4; }
.pm-item.drop-target { outline: 3px dashed var(--navy-2, #163a54); outline-offset: -3px; }
.pm-item[draggable="true"] { cursor: grab; }
.pm-badge { position: absolute; top: 6px; inset-inline-start: 6px; padding: 2px 8px; border-radius: 12px; background: var(--gold, #c8a24a); color: #1d2733; font-size: 12px; font-weight: 700; }
.pm-badge-muted { inset-inline-start: auto; inset-inline-end: 6px; background: #44505c; color: #fff; }
.pm-actions { position: absolute; inset-inline: 0; bottom: 0; display: flex; justify-content: space-between; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.pm-btn { min-width: 34px; min-height: 34px; border: 0; border-radius: 8px; background: rgba(255,255,255,.92); color: #1d2733; font-size: 16px; font-weight: 700; cursor: pointer; }
.pm-btn:disabled { opacity: .35; cursor: default; }
.pm-btn:focus-visible { outline: 2px solid var(--gold, #c8a24a); }
.pm-del { background: #fdecea; color: var(--red, #c0392b); }
.pm-pending img { opacity: .6; }
.pm-progress { height: 6px; background: rgba(0,0,0,.08); border-radius: 3px; overflow: hidden; }
.pm-item .pm-progress { position: absolute; inset-inline: 8px; bottom: 34px; background: rgba(255,255,255,.7); }
.pm-progress span { display: block; height: 100%; width: 0; background: var(--gold, #c8a24a); transition: width .2s; }
.pm-status { position: absolute; inset-inline: 0; bottom: 0; padding: 6px 8px; font-size: 12px; background: rgba(255,255,255,.92); color: #1d2733; }
.pm-failed .pm-status { color: var(--red, #c0392b); font-weight: 600; bottom: 44px; }
.pm-failed .pm-progress { display: none; }
.photo-manager.pm-working { opacity: .8; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 22px 16px; border: 2px dashed #c7d0db; border-radius: 12px; background: #fbfcfd; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone:focus-within, .dropzone.over { border-color: var(--gold, #c8a24a); background: #fffaf0; }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone .dz-icon { font-size: 26px; line-height: 1; color: var(--gold, #c8a24a); }
.dropzone strong { font-size: 16px; color: var(--navy, #0f2a3d); }
.dropzone span, .dropzone small { color: var(--muted, #6b7785); }
.dropzone small { font-size: 12px; max-width: 520px; }

/* Private documents (owner) */
.doc-groups { display: grid; gap: 12px; }
.doc-group { border: 1px solid var(--line, #e3e8ee); border-radius: 10px; padding: 12px 14px; }
.doc-group header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.doc-group h3 { margin: 0; font-size: 16px; }
.doc-req { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 12px; }
.doc-req.req { background: #fff3df; color: #a8650f; }
.doc-req.opt { background: #eef1f5; color: #44505c; }
.doc-state { margin-inline-start: auto; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 12px; background: #eef1f5; color: #44505c; }
.doc-state.ok { background: #e3f4ec; color: var(--green, #1f8a5b); }
.doc-state.missing { background: #fdecea; color: var(--red, #c0392b); }
.doc-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.doc-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.doc-name { flex: 1 1 200px; overflow-wrap: anywhere; }
.doc-note { flex-basis: 100%; color: var(--red, #c0392b); }
.doc-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.doc-upload input[type=file] { max-width: 100%; }
.doc-upload .pm-progress { flex-basis: 100%; display: none; }
.doc-upload.uploading .pm-progress { display: block; }
.doc-msg { flex-basis: 100%; margin: 0; font-size: 13px; min-height: 0; }
.doc-msg.ok { color: var(--green, #1f8a5b); }
.doc-msg.error { color: var(--red, #c0392b); }
tr.group-row th { background: #f4f6f9; text-align: start; }

/* Sound toggle */
.sound-toggle[aria-pressed="true"] { color: var(--gold, #c8a24a); }

@media (max-width: 600px) {
  .pm-grid { grid-template-columns: repeat(2, 1fr); }
  .pm-btn { min-width: 38px; min-height: 38px; }
  .doc-upload > * { flex: 1 1 100%; }
  .ui-toasts { inset-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) { .ui-toast, .pm-progress span, .dropzone { transition: none; } }

/* Sound toggle in the account menu: a neutral setting, not a red action link. */
.account-nav .sound-toggle { color: var(--muted, #66727f) !important; justify-content: flex-start; gap: 8px; font-weight: 500; }
.account-nav .sound-toggle:hover { background: var(--sand, #f7f3ea); color: var(--navy, #0f2a3d) !important; }
.account-nav .sound-toggle[aria-pressed="true"] { color: var(--navy, #0f2a3d) !important; }
@media (max-width: 900px) { .account-nav .sound-toggle { width: auto; } }
