/* WebGIS TP.HCM — UI Upgrade Components (Interactions, Focus, Mobile Drawers) */

.view-button,
.icon-button,
.primary-button,
.outline-button,
.timeline-play,
.timeline-step,
.map-tool-btn,
.layer-toggle-chip {
  transition: background-color 0.16s ease, border-color 0.16s ease,
              color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.view-button:focus-visible,
.mobile-filter-button:focus-visible,
.drawer-toggle:focus-visible,
.map-tool-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chart-card, .map-card, .insight-card, .map-kpi {
  min-width: 0;
}
.view-panel { min-width: 0; }
.table-scroll { -webkit-overflow-scrolling: touch; }

/* Mobile filter toggle injected by ui-upgrade.js; hidden on desktop */
.mobile-filter-button,
.mobile-filter-summary {
  display: none;
}

@media (max-width: 820px) {
  .mobile-filter-summary {
    display: block;
    margin: 4px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .mobile-filter-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 38px;
    margin: 6px 0 0;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: var(--field);
    font-weight: 700;
    font-size: 11.5px;
    text-align: left;
  }
  .mobile-filter-button::after {
    content: "▾";
    font-size: 15px;
    color: var(--accent);
    transition: transform 0.18s ease;
  }
  .controls-panel:not(.mobile-filters-closed) .mobile-filter-button::after {
    transform: rotate(180deg);
  }
  .controls-panel.mobile-filters-closed > .filter-section,
  .controls-panel.mobile-filters-closed > .filter-note,
  .controls-panel.mobile-filters-closed > .filter-polish-card {
    display: none !important;
  }
}
