/* VenueOS — Duty Checklists modal */

/* ── Full-screen overlay ──────────────────────────────────────────── */
.duty-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 6, 0.96);
  z-index: 1300;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  overflow: hidden;
}
.duty-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Modal card ──────────────────────────────────────────────────── */
.duty-modal {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ── Content wrapper — flex column so panel fills remaining height ── */
#duty-modal-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────────── */
.duty-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.duty-modal-title {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass, #c09428);
}
.duty-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.08);
  color: var(--ink, #f0ebe2);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.duty-modal-close:hover { background: rgba(255,255,255,.14); }

/* ── Tabs bar ────────────────────────────────────────────────────── */
.duty-tabs-bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px 0;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.duty-tabs-bar::-webkit-scrollbar { display: none; }

.duty-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  padding: 8px 12px 10px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.55);
  cursor: pointer;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  transition: all .18s;
  text-align: center;
  min-width: 76px;
}
.duty-tab-btn:active { opacity: .7; }
.duty-tab-btn.active {
  background: rgba(192,148,40,.15);
  border-color: rgba(192,148,40,.45);
  color: var(--brass, #c09428);
}
.duty-tab-icon {
  font-size: 1.15rem;
  line-height: 1;
}
.duty-tab-name {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.duty-tab-pct {
  font-size: .6rem;
  font-weight: 700;
  color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.07);
  border-radius: 20px;
  padding: 1px 6px;
  margin-top: 1px;
}
.duty-tab-pct--done {
  background: rgba(74,178,98,.18);
  color: #4ab262;
}

/* ── Scrollable panel ────────────────────────────────────────────── */
.duty-panel-wrap {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  padding: 8px 16px 24px;
}

/* ── Section ─────────────────────────────────────────────────────── */
.duty-section {
  margin-bottom: 20px;
}
.duty-section-hd {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass, #c09428);
  padding: 14px 0 6px;
  border-bottom: 1px solid rgba(192,148,40,.2);
  margin-bottom: 2px;
}

/* ── Item row ────────────────────────────────────────────────────── */
.duty-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: opacity .18s;
}
.duty-item:last-child { border-bottom: none; }
.duty-item--done { opacity: .6; }

.duty-item-body {
  flex: 1;
  min-width: 0;
}
.duty-item-text {
  display: block;
  font-size: .83rem;
  color: var(--ink, #f0ebe2);
  line-height: 1.45;
}
.duty-item--done .duty-item-text {
  text-decoration: line-through;
  color: rgba(240,235,226,.45);
}
.duty-check-info {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  color: #4ab262;
  margin-top: 4px;
  letter-spacing: .01em;
}

/* ── Single check button ─────────────────────────────────────────── */
.duty-check-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Hide native checkbox */
.duty-check-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.duty-check-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  position: relative;
}
.duty-check-wrap:active .duty-check-dot {
  background: rgba(255,255,255,.07);
}

/* Checked state */
.duty-item--done .duty-check-dot {
  background: var(--brass, #c09428);
  border-color: var(--brass, #c09428);
}
.duty-item--done .duty-check-dot::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 10px;
  border-right: 2.5px solid rgba(10,14,6,.9);
  border-bottom: 2.5px solid rgba(10,14,6,.9);
  transform: rotate(45deg) translate(-1px, -2px);
}

/* ── Confirm bar — sticky so it's always visible without scrolling ── */
.duty-confirm-bar {
  position: sticky;
  bottom: 0;
  background: rgb(4, 8, 6);
  margin-top: 8px;
  padding: 16px 0 4px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.duty-confirm-btn {
  width: 100%;
  padding: 15px;
  background: var(--brass, #c09428);
  color: #0a0e06;
  border: none;
  border-radius: 12px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.duty-confirm-btn:active { opacity: .8; }
.duty-confirm-bar--done {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.duty-confirm-status {
  font-size: .73rem;
  font-weight: 700;
  color: #4ab262;
}
.duty-confirm-undo {
  flex-shrink: 0;
  background: none;
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.4);
  font-size: .68rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.duty-tab-pct--confirmed {
  background: rgba(192,148,40,.2);
  color: var(--brass, #c09428);
  font-size: .75rem;
}

/* ── Empty state ─────────────────────────────────────────────────── */
.duty-empty {
  text-align: center;
  padding: 32px 0;
  color: rgba(255,255,255,.35);
  font-size: .88rem;
}

/* ── Desktop tweaks ──────────────────────────────────────────────── */
@media (min-width: 600px) {
  .duty-tab-btn { min-width: 100px; padding: 10px 16px 12px; }
  .duty-tab-name { font-size: .7rem; }
  .duty-item-text { font-size: .9rem; }
  .duty-check-dot { width: 34px; height: 34px; }
}
