/* Accrod Phase 23 — progressive disclosure for mobile filters and tighter record cards.
   The full filter set remains visible at desktop/tablet widths; no filters are removed. */
.responsive-filter-disclosure { min-width:0; }
.responsive-filter-summary { display:none; list-style:none; }
.responsive-filter-summary::-webkit-details-marker { display:none; }
.responsive-filter-content { min-width:0; }
.report-responsive-filter-disclosure { flex:1 1 560px; min-width:0; }
.calendar-responsive-filter-disclosure { flex:1 1 auto; min-width:0; }
.calendar-filter-controls { grid-template-columns:minmax(145px,1fr) minmax(135px,.9fr); }

@media (max-width:680px) {
  /* Advanced choices move behind a small native disclosure. Status and search stay visible. */
  .workspace-body .responsive-filter-disclosure {
    min-width:0;
    width:100%;
    border:1px solid var(--line);
    border-radius:12px;
    overflow:hidden;
    background:var(--surface);
    box-shadow:none;
  }
  .workspace-body .responsive-filter-summary {
    display:flex;
    min-height:44px;
    align-items:center;
    gap:8px;
    padding:7px 11px;
    color:var(--ink);
    background:var(--surface);
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  .workspace-body .responsive-filter-summary:focus-visible {
    outline:2px solid var(--brand);
    outline-offset:-3px;
  }
  .workspace-body .responsive-filter-title {
    flex:0 0 auto;
    font-size:12px;
    font-weight:600;
    letter-spacing:-.01em;
  }
  .workspace-body .responsive-filter-description {
    flex:1 1 auto;
    min-width:0;
    color:var(--muted);
    font-size:11px;
    line-height:1.35;
    overflow-wrap:anywhere;
  }
  .workspace-body .responsive-filter-count {
    flex:0 0 auto;
    padding:4px 6px;
    border-radius:999px;
    background:var(--brand-soft);
    color:var(--brand);
    font-size:11px;
    line-height:1.2;
    font-weight:600;
    white-space:nowrap;
  }
  .workspace-body .responsive-filter-chevron {
    display:grid;
    flex:0 0 23px;
    width:23px;
    height:23px;
    place-items:center;
    border-radius:6px;
    background:var(--surface-2);
    color:var(--muted);
  }
  .workspace-body .responsive-filter-chevron::before { content:'+'; font-size:15px; line-height:1; }
  .workspace-body .responsive-filter-disclosure[open] > .responsive-filter-summary {
    border-bottom:1px solid var(--line);
  }
  .workspace-body .responsive-filter-disclosure[open] > .responsive-filter-summary .responsive-filter-chevron::before { content:'−'; }
  .workspace-body .responsive-filter-content { min-width:0; }
  .workspace-body .responsive-filter-content > .lease-filter-controls,
  .workspace-body .responsive-filter-content > .report-filter-controls,
  .workspace-body .responsive-filter-content > .calendar-filter-controls {
    width:100%;
    min-width:0;
    box-sizing:border-box;
    padding:10px;
    border:0;
    background:transparent;
  }
  .workspace-body .lease-responsive-filter-disclosure { margin:0; border-radius:0 0 12px 12px; }
  .workspace-body .lease-responsive-filter-disclosure .lease-filter-controls { grid-template-columns:minmax(0,1fr); gap:9px; }
  .workspace-body .lease-responsive-filter-disclosure .filter-control select { min-height:44px; }
  .workspace-body .lease-responsive-filter-disclosure .filter-reset { min-height:44px; }

  /* Date screen: keep the export action visible; tuck only the secondary filter selects away. */
  .workspace-body .calendar-filter-bar {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:9px;
    padding:12px;
  }
  .workspace-body .calendar-filter-title { grid-column:1; grid-row:1; min-width:0; }
  .workspace-body .calendar-filter-title h2 { font-size:13px; }
  .workspace-body .calendar-filter-title p { font-size:11px; line-height:1.4; }
  .workspace-body .calendar-responsive-filter-disclosure { grid-column:1 / -1; grid-row:2; }
  .workspace-body .calendar-responsive-filter-disclosure .calendar-filter-controls {
    grid-template-columns:minmax(0,1fr);
    width:100%;
    gap:9px;
  }
  .workspace-body .calendar-export-action { grid-column:2; grid-row:1; min-height:40px; padding-inline:10px; font-size:11px; white-space:nowrap; }

  /* Report filter controls follow the same pattern while the report/export context stays visible. */
  .workspace-body .report-toolbar { align-items:stretch; gap:10px; }
  .workspace-body .report-toolbar-copy h2 { font-size:14px; }
  .workspace-body .report-responsive-filter-disclosure { flex:none; width:100%; }
  .workspace-body .report-responsive-filter-disclosure .report-filter-controls { grid-template-columns:minmax(0,1fr); gap:9px; }
  .workspace-body .report-responsive-filter-disclosure .filter-control select { min-height:44px; }

  /* Compact the tenant cards without removing labels or linked-record context. */
  .workspace-body .data-table tbody tr.tenant-row {
    gap:7px 10px;
    padding:12px;
  }
  .workspace-body .data-table tbody tr.tenant-row td { min-width:0; line-height:1.4; }
  /* The base table rule has greater specificity than the older mobile reset in
     styles.css. Override it explicitly so mobile cards do not inherit 13px TD
     padding on top of the card's own padding and grid gaps. */
  .workspace-body .data-table tbody tr td {
    padding:0;
    border:0;
    vertical-align:top;
    box-sizing:border-box;
  }
  .workspace-body .data-table tbody tr.tenant-row td[data-label="Primary contact"]::before {
    display:block;
    margin:0 0 3px;
    font-size:11px;
    letter-spacing:.015em;
    white-space:nowrap;
  }
  .workspace-body .data-table tbody tr.tenant-row td[data-label="Property"]::before,
  .workspace-body .data-table tbody tr.tenant-row td[data-label="Leases"]::before {
    display:inline;
    margin:0 5px 0 0;
    font-size:11px;
    letter-spacing:.015em;
    white-space:nowrap;
  }
  .workspace-body .data-table tbody tr.tenant-row td:nth-child(1) .table-sub { font-size:11px; margin-top:2px; }
  .workspace-body .data-table tbody tr.tenant-row td:nth-child(2) { overflow-wrap:anywhere; }
  .workspace-body .data-table tbody tr.tenant-row td:nth-child(3) { overflow-wrap:anywhere; }

  /* Document details are inline where safe, so every metadata field does not consume a full extra label row. */
  .workspace-body .data-table tbody tr.doc-row {
    padding:12px;
    gap:7px 10px;
  }
  .workspace-body .data-table tbody tr.doc-row td { line-height:1.4; }
  .workspace-body .data-table tbody tr.doc-row td[data-label="Related lease"]::before,
  .workspace-body .data-table tbody tr.doc-row td[data-label="Type"]::before,
  .workspace-body .data-table tbody tr.doc-row td[data-label="Last updated"]::before {
    display:inline;
    margin:0 6px 0 0;
    font-size:11px;
    letter-spacing:.015em;
    white-space:normal;
  }
  .workspace-body .data-table tbody tr.doc-row td[data-label="Related lease"] .table-main {
    display:inline;
    max-width:100%;
    line-height:1.45;
    overflow-wrap:anywhere;
  }
  .workspace-body .data-table tbody tr.doc-row td[data-label="Type"] { grid-column:1; grid-row:3; }
  .workspace-body .data-table tbody tr.doc-row td[data-label="Status"] { grid-column:2; grid-row:3; justify-self:end; }
  .workspace-body .data-table tbody tr.doc-row td[data-label="Last updated"] { grid-column:1 / -1; grid-row:4; }
  .workspace-body .data-table tbody tr.doc-row .table-sub { font-size:11px; }

  .workspace-body.dark-mode .responsive-filter-summary { background:var(--surface); color:var(--ink); }
  .workspace-body.dark-mode .responsive-filter-count { background:#292f59; color:#c6ccff; }
  .workspace-body.dark-mode .responsive-filter-chevron { background:#202a3e; color:#c1cde0; }
}

@media (max-width:380px) {
  .workspace-body .responsive-filter-summary { gap:6px; padding-inline:9px; }
  .workspace-body .responsive-filter-title { font-size:12px; }
  .workspace-body .responsive-filter-description { font-size:11px; }
  .workspace-body .responsive-filter-count { font-size:11px; padding:4px 5px; }
  .workspace-body .tenant-row .table-main { overflow-wrap:anywhere; }
  .workspace-body .doc-row td[data-label="Related lease"] .table-main { font-size:12px; }
  .workspace-body .calendar-export-action { padding-inline:8px; font-size:11px; }
}

@media (prefers-reduced-motion:reduce) {
  .workspace-body .responsive-filter-disclosure,
  .workspace-body .responsive-filter-summary { scroll-behavior:auto; transition:none!important; animation:none!important; }
}
