/* Path: static/lease.css
   Purpose: the Lease panel (static/lease.js): the holder's emblem and name, the lease's status, and for a
   member the night raids, for a manager the doors that can be shut, the transfer point and ending the lease. Its stacking
   comes from static/windows.js. */

.lease-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(400px, calc(100% - 32px));
  max-height: calc(100% - 24px); overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; display: grid; gap: 10px;
  padding: 16px; background: rgba(7,11,20,.96); border: 1px solid rgba(155,232,155,.45); color: #dcebff; font-size: 13px; }
.lease-box header { display: flex; align-items: center; gap: 10px; }
.lease-box h3 { flex: 1; min-width: 0; margin: 0; font: 400 20px var(--f-type); color: #eaf4ff; overflow-wrap: anywhere; }
.lease-box h4 { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7f9bb8; }
.lease-box p { margin: 0; }
.lease-mark { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.18); }
.lease-ends, .lease-none { color: #b9cbe0; }
.lease-status, .lease-point { color: #dcebff; overflow-wrap: anywhere; }
.lease-point-do { display: flex; flex-wrap: wrap; gap: 6px; }

/* Each loop door: where it leads and whether it is shut, with the button that changes it. */
.lease-doors { list-style: none; margin: 0; padding: 0; display: grid; }
.lease-doors li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.08); }
.lease-doors li:first-child { border-top: 0; }
.lease-door { flex: 1; min-width: 0; display: grid; gap: 2px; }
.lease-door b { font-weight: 600; overflow-wrap: anywhere; }
.lease-door span { font-size: 12px; color: #b9cbe0; }
.lease-doors button { flex: none; }
.lease-end { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); }
.lease-end p { flex-basis: 100%; color: #eaf4ff; }

/* Each night raid, newest first: one wrapped line per raid under the same dividers as the doors. */
.lease-raids { list-style: none; margin: 0; padding: 0; display: grid; }
.lease-raids li { padding: 6px 0; border-top: 1px solid rgba(255,255,255,.08); color: #b9cbe0; line-height: 1.4; overflow-wrap: anywhere; }
.lease-raids li:first-child { border-top: 0; }

html.bk-touch-ui .lease-box button { min-height: 44px; min-width: 44px; font-size: 16px; }
html.bk-touch-ui .lease-doors li { min-height: 44px; }
/* A phone on its side: less padding, so the doors show sooner; the body scrolls past that. */
@media (max-height: 500px) {
  .lease-box { padding: 10px 12px; gap: 6px; max-height: calc(100% - 16px); }
  .lease-box h3 { font-size: 17px; }
  .lease-doors li, .lease-raids li { padding: 2px 0; }
}
