/* ════════════════════════════════════════════════════════════
 * DocPay v5.3 Enhancements — CSS overrides
 * Implements features without modifying the v32 bundle
 * ════════════════════════════════════════════════════════════ */

/* ── #8 Filter chips: horizontal scroll on all screens ───── */
.app-shell [class*="chip-row"],
.dp-filter-chips {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 8px !important;
  padding-bottom: 6px !important;
  scrollbar-width: thin;
}
.dp-filter-chips::-webkit-scrollbar { height: 4px; }
.dp-filter-chips::-webkit-scrollbar-thumb { background: #2e4470; border-radius: 2px; }

/* ── #3 User card chips: one row with specialty/sub/city ── */
.dp-user-chips {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 6px !important;
  margin: 4px 0 !important;
  scrollbar-width: none;
}
.dp-user-chips::-webkit-scrollbar { display: none; }
.dp-user-chips .pill { white-space: nowrap; flex-shrink: 0; }

/* ── #2 Availability banner at top of Home ──────────────── */
.dp-availability-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 14px; margin-bottom: 12px;
  background: linear-gradient(90deg, rgba(245,200,66,.12), rgba(245,200,66,.06));
  border: 1px solid rgba(245,200,66,.3);
  border-radius: 12px;
  font-size: 13px; font-weight: 700;
}
.dp-availability-banner .status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--green, #34d399);
  box-shadow: 0 0 8px rgba(52,211,153,.6);
  flex-shrink: 0;
}
.dp-availability-banner.busy .status-dot { background: var(--gold, #f5c842); box-shadow: 0 0 8px rgba(245,200,66,.6); }
.dp-availability-banner.off .status-dot   { background: var(--red, #f87171);   box-shadow: 0 0 8px rgba(248,113,113,.6); }
.dp-availability-banner select {
  background: transparent; color: var(--gold, #f5c842); border: 1px solid var(--gold, #f5c842);
  border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.dp-hide { display: none !important; }

/* ── #6 Group expand chevron + member list ──────────────── */
.dp-expand-btn {
  cursor: pointer; user-select: none; transition: transform .2s;
  display: inline-block; margin-left: 6px; color: var(--gold);
}
.dp-expand-btn.open { transform: rotate(90deg); }
.dp-expanded-members {
  margin-top: 8px; padding: 8px 12px; background: rgba(245,200,66,.05);
  border-left: 2px solid var(--gold, #f5c842); border-radius: 0 8px 8px 0;
  font-size: 12px;
}
.dp-expanded-members .member-row { padding: 4px 0; color: var(--text-2, #b8c8e0); }

/* ── #7 Datalist styling ─────────────────────────────────── */
input[list] { background-image: none; }

/* ── #9 Team browse: city chip styling ──────────────────── */
.dp-city-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; font-size: 10px; font-weight: 700;
  background: rgba(96,165,250,.15); color: #60a5fa;
  border: 1px solid rgba(96,165,250,.35);
  border-radius: 999px; margin-left: 6px;
}

/* ── #1 Visibility row in profile ───────────────────────── */
.dp-profile-visibility-card {
  margin: 12px 0; padding: 14px;
  background: #131e36; border: 1px solid #243454; border-radius: 14px;
}
.dp-profile-visibility-card h3 {
  font-size: 13px; font-weight: 800; color: #b8c8e0;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
}
.dp-profile-visibility-card .row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.dp-profile-visibility-card .desc { font-size: 12px; color: #6e88ab; margin-top: 4px; }

/* ── User detail modal (clicking a user card) ───────────── */
.dp-user-modal-back {
  position: fixed; inset: 0; background: rgba(5,10,22,.85);
  backdrop-filter: blur(6px); z-index: 9000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.dp-user-modal {
  background: #131e36; border: 1px solid #243454; border-radius: 16px;
  max-width: 420px; width: 100%; padding: 24px;
  max-height: 80vh; overflow-y: auto;
}
.dp-user-modal h2 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.dp-user-modal .role-pill { font-size: 11px; color: #f5c842; margin-bottom: 14px; }
.dp-user-modal .field-row { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid #243454; font-size: 13px; }
.dp-user-modal .field-row b { color: #6e88ab; font-weight: 700; min-width: 90px; }
.dp-user-modal .close-btn {
  background: #243454; color: #edf2ff; border: 0; border-radius: 8px;
  padding: 10px 20px; font-weight: 800; cursor: pointer; margin-top: 14px; width: 100%;
}



/* Sidebar (was bottom tabbar) */
/* Each tab button */
/* Icon: always visible, fixed size, centered in collapsed mode */
/* Label: visible when expanded, hidden when collapsed */
/* Toggle button: top-left of sidebar */
  #dp-sidebar-toggle {
    position: fixed !important;
    top: 12px !important;
    left: 12px !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    background: #182643 !important;
    color: #f5c842 !important;
    border: 1px solid #243454 !important;
    border-radius: 10px !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    cursor: pointer;
    z-index: 60;
    box-shadow: 0 4px 14px rgba(0,0,0,.4);
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: left .28s cubic-bezier(.2,.7,.3,1), background .15s;
  }
  #dp-sidebar-toggle:hover {
    background: #243454 !important;
  }

  /* Main content area: prevent FAB overlap, add comfortable padding */
/* Sync chip: bottom-right (away from sidebar) */
}

/* Hide toggle on mobile (<720px); v32 keeps bottom tabs */





/* ════════════════════════════════════════════════════════════
 * v5.9.3 — Full width on desktop + hide demo banner
 * Lets bundle's NATIVE sidebar handle layout at ≥900px
 * Adds nothing tablet-specific (avoids layout conflicts)
 * ════════════════════════════════════════════════════════════ */

/* Hide DEMO MODE banner wherever it appears */
[class*="demo-banner"], [class*="demo-mode"], [id*="demo-banner"], [id*="demo-mode"],
[class*="DemoBanner"], [class*="DemoMode"],
div[style*="DEMO MODE"], div[style*="Mock data"] {
  display: none !important;
}

/* Hide by text content using attribute selectors won't work — use JS instead.
   But also hide common fixed-position warning banners at bottom-left */
.app-shell ~ div[style*="position:fixed"][style*="bottom"][style*="left"],
.app-shell + div[style*="position: fixed"][style*="bottom"][style*="left"] {
  display: none !important;
}

/* Full-width on desktop only — don't touch tablet/mobile (let bundle handle) */
@media (min-width: 900px) {
  .app-shell {
    max-width: 100% !important;
  }
  .scroll-area {
    max-width: none !important;
    padding: 18px 32px 28px !important;
  }
  .fab {
    right: 32px !important;
    bottom: 32px !important;
  }
}


/* ════════════════════════════════════════════════════════════
 * v5.9.7 — Sidebar: Me tab at bottom + show username next to it
 * Works with bundle's native sidebar at >=900px
 * ════════════════════════════════════════════════════════════ */

@media (min-width: 900px) {
  /* Tabbar uses flex column so last child can margin-top:auto */
  .tabbar {
    display: flex !important;
    flex-direction: column !important;
    min-height: calc(100vh - 70px) !important;
  }

  /* The Me tab (last in tabbar) sticks to bottom */
  .tabbar .tab-btn:last-child {
    margin-top: auto !important;
    border-top: 1px solid var(--line) !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    background: rgba(245, 200, 66, .04) !important;
  }

  /* When collapsed (icons only) - Me still at bottom but no extra padding */
  .app-shell[data-sidebar="collapsed"] .tabbar .tab-btn:last-child {
    padding: 12px 4px !important;
  }
}

/* Show username as a small subtitle below "Me" text when expanded */
.app-shell[data-sidebar="expanded"] .tabbar .tab-btn[data-dp-meuser]:last-child::after,
@media (min-width: 900px) {
  .tabbar .tab-btn:last-child .tab-btn-label[data-dp-me] {
    font-weight: 800;
    color: var(--gold);
  }
}
