/* Мини-приложение MAXCity — mobile-first каркас авторизации */
:root {
  --city-bg: #e8eef3;
  --city-ink: #1a2b3c;
  --city-accent: #0b6e4f;
  --city-panel: #f7fafc;
  --city-danger: #9b2226;
}

body {
  margin: 0;
  background: var(--city-bg);
  color: var(--city-ink);
  font-family: "Segoe UI", system-ui, sans-serif;
}

.app-shell {
  max-width: 390px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--city-panel);
  box-shadow: 0 0 0 1px #c5d0da;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
  padding: 1rem 1rem 2rem;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.btn-accent {
  background: var(--city-accent);
  border-color: var(--city-accent);
  color: #fff;
}

.btn-accent:hover {
  background: #095c42;
  color: #fff;
}

.status-box {
  border: 1px solid #d5dee6;
  border-radius: 0.5rem;
  padding: 0.85rem;
  background: #fff;
}

.status-box.error {
  border-color: #e6b0b0;
  color: var(--city-danger);
}

.spinner-wrap {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.spinner-wrap.is-active {
  display: flex;
}

.pdn-note {
  font-size: 0.85rem;
  color: #4a5d6e;
}

.app-shell-map {
  height: 100vh;
  max-height: 100vh;
}

.filters-bar {
  background: #fff;
  border-bottom: 1px solid #c5d0da;
  padding: 0.5rem 0.75rem;
}

.filter-select {
  width: auto;
  min-width: 8rem;
}

.map-main {
  flex: 1;
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.map-container {
  flex: 1;
  min-height: 280px;
}

.pick-map {
  height: 200px;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #c5d0da;
}

/* Мастер создания обращения: карта на весь оставшийся экран */
.create-wizard {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}

.create-wizard-header {
  flex-shrink: 0;
}

.create-wizard-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

.create-wizard-main .step-panel.active:not(.step-panel-map) {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.create-wizard-main .step-panel-map.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.create-wizard .pick-map-full {
  flex: 1;
  height: auto;
  min-height: 0;
}

.create-wizard .wizard-nav {
  flex-shrink: 0;
}

.btn-geo-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c5d0da;
  border-radius: 0.5rem;
  background: #fff;
  color: var(--city-accent);
  line-height: 1;
}

.btn-geo-icon:hover,
.btn-geo-icon:focus-visible {
  background: #eef7f3;
  color: #095c42;
  border-color: var(--city-accent);
}

.btn-geo-icon:disabled,
.btn-geo-icon.is-loading {
  opacity: 0.65;
}

.btn-geo-icon.is-loading {
  animation: geo-pulse 1s ease-in-out infinite;
}

@keyframes geo-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

/* Всплывающие сообщения снизу (ошибки и подсказки мастера) */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(22rem, calc(100vw - 1.5rem));
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.app-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.65rem;
  box-shadow: 0 8px 24px rgba(26, 43, 60, 0.18);
  background: #1a2b3c;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.35;
  animation: toast-in 0.2s ease-out;
}

.app-toast.is-leaving {
  animation: toast-out 0.2s ease-in forwards;
}

.app-toast--error {
  background: #7a1c1f;
}

.app-toast--info {
  background: #1a2b3c;
}

.app-toast__text {
  flex: 1;
  min-width: 0;
}

.app-toast__close {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.85;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 0.15rem;
  cursor: pointer;
}

.app-toast__close:hover,
.app-toast__close:focus-visible {
  opacity: 1;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(0.5rem);
  }
}

.map-fallback {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #b7c9b4, #9eb6c9);
}

.list-panel {
  flex: 1;
  overflow-y: auto;
  border-top: 1px solid #c5d0da;
}

.bottom-nav {
  background: #fff;
  border-top: 1px solid #c5d0da;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0.35rem 0.25rem;
  font-size: 0.65rem;
  text-align: center;
}

.bottom-nav a {
  color: #4a5d6e;
  text-decoration: none;
  display: block;
}

.bottom-nav a.active {
  color: var(--city-accent);
  font-weight: 600;
}

.bottom-nav span {
  display: block;
  font-size: 1rem;
  line-height: 1.1;
}

.step-dot {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  background: #dce8f0;
}

.step-dot.active {
  background: var(--city-accent);
  color: #fff;
}

.step-dot.done {
  background: #9fd0bd;
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

.category-btn.btn-accent {
  background: var(--city-accent);
  border-color: var(--city-accent);
  color: #fff;
}
