/* Site-visit screen lock (visit-lock-ui.js): the locked page an employee sees from Start visit until the end photo, the 30-minute reminder window, and the admin's
   "On a site visit now" card. Uses the colours of styles.css, so dark mode follows by itself. */
body.vl-locked { background: var(--bg, #f6f4ef); }
.vl-page { min-height: 100%; display: flex; justify-content: center; padding: 16px 16px 40px; background: var(--bg, #f6f4ef); color: var(--ink, #1c1c1c); }
.vl-wrap { width: min(640px, 100%); }
.vl-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.vl-logo { height: 28px; width: auto; display: block; }
.vl-card { background: var(--surface, #fff); color: var(--ink, #1c1c1c); border: 1px solid var(--line, #ddd); border-radius: var(--radius-lg, 16px); padding: 22px 20px 20px; box-shadow: 0 6px 28px rgba(0, 0, 0, .10); }
.vl-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; background: var(--warn-bg, #fff4d6); color: var(--warn-text, #7a5a00); border: 1px solid var(--warn-border, #e6cf8a); }
.vl-card h1 { font-size: 1.45rem; line-height: 1.2; margin: 12px 0 4px; overflow-wrap: anywhere; }
.vl-card h2 { font-size: 1.05rem; margin: 0 0 6px; }
.vl-sub { margin: 0 0 8px; color: var(--muted, #5b5b5b); font-size: .95rem; }
.vl-msg { margin: 6px 0 14px; line-height: 1.5; }
.vl-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 18px; }
.vl-actions .btn { text-decoration: none; justify-content: center; }
#vl-call { display: contents; }
.vl-big { padding: 12px 20px; font-size: 1.02rem; }
.vl-sec { border-top: 1px solid var(--line, #ddd); padding-top: 14px; margin-top: 14px; }
.vl-ro { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--surface-2, #f1efe9); color: var(--muted, #5b5b5b); border: 1px solid var(--line, #ddd); vertical-align: middle; }
.vl-dl { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: 6px 14px; margin: 8px 0 0; }
.vl-dl dt { color: var(--muted, #5b5b5b); font-size: .88rem; }
.vl-dl dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.vl-dl a { color: var(--accent, #0b6b52); font-weight: 700; }
.vl-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.vl-list li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 9px 11px; border: 1px solid var(--line, #ddd); border-radius: 10px; background: var(--surface-2, #f7f5f0); }
.vl-list .vl-amt { font-weight: 800; }
.vl-empty { margin: 8px 0 0; color: var(--muted, #5b5b5b); font-size: .93rem; }
.vl-req { padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; margin: 8px 0; background: var(--surface-2, #f3f1ec); border: 1px solid var(--line, #ddd); }
.vl-form { margin-top: 10px; }
.vl-form label { display: block; font-weight: 700; margin-bottom: 4px; font-size: 14px; }
.vl-form textarea, .vl-reason { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--field-line, #ccc); border-radius: 10px; background: var(--surface, #fff); color: var(--ink, #1c1c1c); font: inherit; resize: vertical; }
.vl-err { margin: 6px 0; font-size: 14px; font-weight: 600; color: var(--status-invalid, #b3261e); }
.vl-err[hidden] { display: none; }
.vl-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.vl-backdrop { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 24, 22, .66); overflow-y: auto; }
.vl-pop { position: relative; width: min(460px, 100%); background: var(--surface, #fff); color: var(--ink, #1c1c1c); border: 1px solid var(--line, #ddd); border-radius: var(--radius-lg, 16px); padding: 24px 22px 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); outline: none; }
.vl-pop h2 { font-size: 1.2rem; margin: 0 0 6px; padding-right: 30px; }
.vl-pop p { margin: 6px 0 14px; line-height: 1.5; }
.vl-x { position: absolute; top: 10px; right: 12px; appearance: none; border: 0; background: transparent; color: var(--muted, #5b5b5b); font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.vl-x:hover { background: var(--surface-2, #f1f1f1); }
body.vl-locked #tc-vunlink { display: none; }
.vl-card [hidden], .vl-pop [hidden] { display: none !important; }   /* a button with a display rule of its own must still hide when the page says hidden */

/* the admin card on the Site Visits page */
.vl-admin .ap-tablewrap { margin-top: 4px; }
.vl-who small { display: block; color: var(--muted, #5b5b5b); }
.vl-admin td small { display: block; }
.vl-flag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: var(--decl-bg, #fdecea); color: var(--decl-text, #8a1c14); border: 1px solid var(--decl-line, #f3b8b3); }
.vl-asked { display: block; font-size: .85rem; color: var(--warn-text, #7a5a00); font-weight: 700; }
.vl-note { display: block; font-size: .85rem; color: var(--muted, #5b5b5b); overflow-wrap: anywhere; }
.vl-more { margin-top: 12px; border-top: 1px solid var(--line, #ddd); padding-top: 10px; }
.vl-more > summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.vl-set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; margin: 10px 0; }
.vl-set-grid label { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
.vl-set-grid input { padding: 8px 10px; border: 1px solid var(--field-line, #ccc); border-radius: 8px; background: var(--surface, #fff); color: var(--ink, #1c1c1c); font: inherit; width: 100%; box-sizing: border-box; }
.vl-ctx { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2, #f3f1ec); border: 1px solid var(--line, #ddd); font-size: .92rem; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .vl-page { padding: 10px 12px 32px; }
  .vl-card { padding: 18px 14px 16px; }
  .vl-actions .btn { flex: 1 1 100%; }
  .vl-dl { grid-template-columns: 1fr; gap: 0; }
  .vl-dl dt { margin-top: 8px; }
  .vl-btns .btn { flex: 1 1 100%; }
}
.vl-form textarea::placeholder, .vl-reason::placeholder { color: var(--muted, #5b5b5b); opacity: 1; }

/* nobody locked: the admin card is a slim strip, so nothing below it moves far down */
.vl-slim { padding-top: 10px; padding-bottom: 8px; margin-bottom: 8px; }
.vl-slim .dc-head { margin-bottom: 0; }
.vl-slim .vl-more { display: inline-block; margin: 4px 22px 0 0; border-top: 0; padding-top: 0; vertical-align: top; }
.vl-slim .vl-more[open] { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line, #ddd); }
