/* Suffix Query app shell, aligned with rmrgmap styling. */

html,
body {
  height: 100%;
}

.suffix-page {
  --suffix-chevron-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300695c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --suffix-chevron-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-theme="dark"] .suffix-page {
  --suffix-chevron-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2326a69a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.suffix-page,
.suffix-page * {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-light);
}

.suffix-page ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.suffix-page ::-webkit-scrollbar-track {
  background: transparent;
}

.suffix-page ::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 5px;
}

.suffix-page ::-webkit-scrollbar-thumb:hover {
  background: var(--hover-primary);
}

.suffix-page select {
  appearance: none;
  background-color: var(--card-bg);
  background-image: var(--suffix-chevron-image);
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 16px;
  padding-right: 2.35rem;
  cursor: pointer;
}

.suffix-page select::-ms-expand {
  display: none;
}

.app-bar {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 8px var(--shadow-color);
  z-index: 5000;
}

.app-bar-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.app-home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--primary);
}

.app-home-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.app-title {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  white-space: nowrap;
}

.app-bar-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
  margin: 0 0.25rem;
}

.app-bar .theme-toggle {
  background: var(--section-bg);
  color: var(--primary);
  border: 1px solid var(--border-color);
}

.app-bar .theme-toggle:hover {
  background: var(--border-color);
}

.contact-btn.small[aria-pressed="true"] {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* History menu */
.app-menu {
  position: relative;
  z-index: 5100;
}

.app-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  width: min(360px, calc(100vw - 1.5rem));
  display: none;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  z-index: 5100;
  overflow: hidden;
}

.app-menu.open .app-menu-panel {
  display: flex;
}

.app-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--secondary-text);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.78rem;
}

.history-list {
  max-height: 360px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.history-empty {
  padding: 1rem;
  color: var(--secondary-text);
  font-size: 0.85rem;
  text-align: center;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--border-light);
  background: transparent;
  text-align: left;
}

.history-item:hover {
  background: var(--section-bg);
}

.history-main {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.history-meta {
  font-size: 0.74rem;
  color: var(--secondary-text);
}

.history-copy {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.history-load-button {
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}

.history-load-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.history-actions {
  display: flex;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.history-actions .map-icon-btn {
  width: 30px;
  height: 30px;
  box-shadow: none;
}

/* Main app surface */
.suffix-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  background: var(--bg-light);
}

.suffix-workspace {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.workspace-view {
  flex: 1 1 auto;
  min-height: 0;
  display: none;
}

.workspace-view.is-active {
  display: flex;
}

.map-view {
  position: relative;
  flex-direction: column;
}

.map-heat-controls {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.map-heat-controls[hidden] {
  display: none;
}

.map-container {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  border: 0;
  border-radius: 0;
  background: var(--card-bg);
}

.map-overlay {
  position: absolute;
  z-index: 1100;
  pointer-events: auto;
}

.map-overlay-left {
  top: 0.75rem;
  left: 0.75rem;
}

.map-overlay-right {
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.4rem;
}

.map-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  font-size: 0.74rem;
  font-weight: 800;
}

.map-icon-btn:hover {
  border-color: var(--primary);
  background: var(--section-bg);
}

.map-icon-btn svg {
  width: 1rem;
  height: 1rem;
}

.segmented.compact {
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.segmented.compact .segmented-btn {
  min-height: 34px;
  padding: 0.35rem 0.6rem;
}

.map-menu-panel .mini-field select,
.map-menu-panel .mini-field input[type="range"] {
  min-width: 0;
  width: 100%;
}

.map-menu-panel .map-heat-controls {
  align-items: stretch;
  flex-direction: column;
  gap: 0.55rem;
}

.heat-settings-details summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  list-style: none;
}

.heat-settings-details[open] summary {
  margin-bottom: 0.55rem;
}

.heat-settings-details summary::-webkit-details-marker,
.place-types-details summary::-webkit-details-marker {
  display: none;
}

.heat-settings-details summary::after,
.place-types-details summary::after {
  content: "";
  width: 16px;
  height: 16px;
  margin-left: auto;
  flex: 0 0 16px;
  background: currentColor;
  opacity: 0.7;
  -webkit-mask: var(--suffix-chevron-mask) center / 16px 16px no-repeat;
  mask: var(--suffix-chevron-mask) center / 16px 16px no-repeat;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
}

.heat-settings-details summary:hover::after,
.place-types-details summary:hover::after {
  opacity: 1;
}

.heat-settings-details[open] summary::after,
.place-types-details[open] summary::after {
  transform: rotate(180deg);
}

.mini-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mini-field-value {
  color: var(--tertiary-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
}

.fullscreen-map {
  position: fixed !important;
  inset: 0;
  z-index: 3000;
  height: 100% !important;
  border-radius: 0;
}

.leaflet-container {
  font-family: "Manrope", sans-serif;
}

.map-context-menu {
  position: absolute;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.map-context-menu button {
  border: 0;
  background: transparent;
  color: var(--text-dark);
  padding: 0.55rem 0.75rem;
  text-align: left;
  font-size: 0.84rem;
}

.map-context-menu button:hover {
  background: var(--section-bg);
  color: var(--primary);
}

/* Results view */
.results-view {
  flex-direction: column;
  background: var(--bg-light);
}

.results-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--card-bg);
  box-shadow: 0 1px 8px var(--shadow-color);
  z-index: 2;
}

.results-head h2 {
  margin: 0;
  color: var(--primary);
  font-size: 1.05rem;
  line-height: 1.2;
}

.results-head p {
  margin: 0.2rem 0 0;
  color: var(--secondary-text);
  font-size: 0.82rem;
  font-weight: 600;
}

.results-head-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.results-toolbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--card-bg);
}

.results-filter-group {
  max-width: 460px;
}

.results-selection-summary {
  color: var(--secondary-text);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.results-toolbar-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.results-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.75rem;
}

.results-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  font-size: 0.86rem;
  box-shadow: 0 2px 10px var(--shadow-color);
}

.results-table[hidden] {
  display: none;
}

.results-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--section-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0.55rem 0.7rem;
  text-align: left;
  color: var(--primary);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.results-table th.num,
.results-table td.num {
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

.results-table th.col-check,
.results-table td.col-check {
  width: 38px;
  text-align: center;
}

.results-table th.sortable {
  padding: 0;
  cursor: default;
  user-select: none;
}

.results-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0.7rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.results-sort-button:hover .daily-sort-label {
  color: var(--hover-primary);
}

.results-sort-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  border-radius: 4px;
}

.results-table th.num .results-sort-button {
  justify-content: flex-end;
}

.daily-sort-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.daily-sort-arrows {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--secondary-text);
  line-height: 0;
}

.daily-sort-icon {
  width: 12px;
  height: 12px;
}

.daily-sort-arrow {
  opacity: 0.36;
  transition: color 0.2s, opacity 0.2s;
}

.results-table th.sorted-asc .daily-sort-arrow-up,
.results-table th.sorted-desc .daily-sort-arrow-down,
.daily-sort-active.daily-sort-asc .daily-sort-arrow-up,
.daily-sort-active.daily-sort-desc .daily-sort-arrow-down {
  color: var(--primary);
  opacity: 1;
}

.results-table tbody td {
  padding: 0.62rem 0.7rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.result-row {
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.result-row:hover,
.result-row.expanded {
  background: var(--section-bg);
}

.result-row:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.result-row.is-selected {
  background: var(--section-bg);
}

.result-row.is-selected:hover,
.result-row.is-selected.expanded {
  background: var(--section-bg);
}

.result-row.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--primary);
}

.result-name-cell {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.result-name {
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
}

.result-coords {
  color: var(--tertiary-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 600;
}

.result-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--section-bg);
  color: var(--primary);
  padding: 0.18rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.osm-key {
  color: var(--primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.osm-key:hover {
  text-decoration: underline;
}

.detail-row td {
  padding: 0 !important;
  background: var(--section-bg);
}

.detail-box {
  padding: 0.85rem 1rem;
  display: grid;
  gap: 0.75rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

.detail-key {
  display: block;
  color: var(--secondary-text);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tags-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.tags-table td {
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.tags-table td:first-child {
  width: 38%;
  color: var(--secondary-text);
  font-weight: 600;
}

.detail-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.detail-links a,
.detail-copy-btn {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
}

.detail-copy-btn {
  padding: 0;
  border: 0;
  background: transparent;
  font-family: "Manrope", sans-serif;
}

.results-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--secondary-text);
  font-size: 0.9rem;
}

.results-empty[hidden] {
  display: none;
}

/* Right dock */
.side-dock {
  flex: 0 0 var(--dock-width, 380px);
  max-width: 48vw;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--border-color);
  background: var(--card-bg);
}

.dock-tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.dock-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--secondary-text);
  padding: 0.55rem 0.85rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
}

.dock-tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.dock-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: none;
  flex-direction: column;
}

.dock-panel.is-active {
  display: flex;
}

.dock-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.75rem;
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.dock-actions {
  flex: 0 0 auto;
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border-color);
  background: var(--card-bg);
}

.form-section {
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: var(--section-bg);
}

.form-section h3 {
  color: var(--primary);
  font-size: 0.86rem;
  line-height: 1.2;
  margin: 0;
}

.field-label {
  display: block;
  color: var(--secondary-text);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.optional {
  color: var(--tertiary-text);
  font-weight: 500;
}

.input-group {
  margin-bottom: 0;
}

.checkbox-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-dark);
  font-size: 0.84rem;
  cursor: pointer;
}

.checkbox-option input {
  width: auto;
}

.advanced-section {
  gap: 0.8rem;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.toggle-grid.compact-toggles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.toggle-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.toggle-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-option span {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--secondary-text);
  padding: 0.4rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.toggle-option:hover span {
  border-color: var(--primary);
  color: var(--primary);
}

.toggle-option input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.14);
}

.toggle-option input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.segmented.fill {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented-btn {
  border: 0;
  background: var(--card-bg);
  color: var(--secondary-text);
  padding: 0.38rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.segmented-btn.is-active {
  background: var(--primary);
  color: #fff;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.preset-btn {
  min-height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--secondary-text);
  font-weight: 700;
  font-size: 0.78rem;
}

.preset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.preset-btn.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.place-types-details {
  border-top: 1px solid var(--border-color);
  padding-top: 0.55rem;
}

.place-types-details summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.place-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 0.38rem 0.75rem;
  margin-top: 0.65rem;
}

.mini-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--secondary-text);
  font-size: 0.72rem;
  font-weight: 700;
}

.mini-field select,
.mini-field input[type="range"] {
  min-width: 120px;
}

.query-summary,
.selection-summary,
.export-note {
  margin: 0;
  color: var(--secondary-text);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
}

.inline-status {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--section-bg);
  color: var(--secondary-text);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
}

.inline-status.is-info {
  border-color: rgba(23, 105, 170, 0.34);
  background: var(--info-bg);
  color: var(--info);
}

.inline-status.is-success {
  border-color: rgba(22, 131, 59, 0.34);
  background: var(--success-bg);
  color: var(--success);
}

.inline-status.is-warning {
  border-color: rgba(154, 103, 0, 0.34);
  background: var(--warning-bg);
  color: var(--warning);
}

.inline-status.is-error {
  border-color: rgba(217, 48, 37, 0.34);
  background: var(--danger-bg);
  color: var(--danger);
}

.action-row,
.selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dock-depth-control {
  display: grid;
  gap: 0.4rem;
}

.depth-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.depth-toggle .segmented-btn {
  min-width: 0;
}

.action-row .contact-btn {
  flex: 1;
}

.action-row .contact-btn.icon-only {
  flex: 0 0 42px;
  padding-inline: 0;
}

[hidden] {
  display: none !important;
}

/* Status bar */
.status-bar {
  display: none;
}

.status-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary-text);
  font-size: 0.78rem;
  font-weight: 600;
  min-width: 0;
}

.status-message {
  flex: 1;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-sep {
  color: var(--border-color);
}

/* Export dialog */
.modal {
  display: none;
}

.modal.open {
  display: flex;
}

.modal-content {
  width: min(560px, 96vw);
}

.export-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
}

.export-scope {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: var(--section-bg);
  color: var(--secondary-text);
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 980px) {
  .suffix-page {
    overflow: auto;
  }

  .suffix-main {
    flex-direction: column;
    min-height: 0;
  }

  .suffix-workspace {
    min-height: 60vh;
  }

  .side-dock {
    flex-basis: auto;
    max-width: none;
    border-left: 0;
    border-top: 1px solid var(--border-color);
    min-height: 420px;
  }

  .app-bar {
    flex-wrap: wrap;
  }

  .status-message {
    order: 3;
    flex-basis: 100%;
  }

  .results-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .results-filter-group {
    max-width: none;
  }

  .results-toolbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .app-bar {
    align-items: flex-start;
  }

  .app-bar-group {
    width: 100%;
  }

  .app-bar-group:last-child {
    justify-content: flex-start;
  }

  .map-overlay-left {
    top: 0.75rem;
    left: 0.75rem;
  }

  .map-overlay-right {
    top: 0.75rem;
    right: 0.75rem;
  }

  .results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .results-head-actions,
  .results-head-actions .contact-btn,
  .selection-actions .contact-btn,
  .results-toolbar-actions .contact-btn {
    width: 100%;
  }

  .preset-grid {
    grid-template-columns: 1fr;
  }
}
