.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.breadcrumb a {
  color: var(--text-muted);
  font-weight: 600;
}

.results-wrap {
  max-width: 960px;
}

.results-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}

.results-title {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 4vw, 44px);
  margin: 0 0 6px;
}

.results-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-weight: 600;
}

.map-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 0;
  background: var(--accent);
  font-weight: 700;
  color: #0b2e18;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(39, 174, 96, 0.2);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0 14px;
}

.filter-pill,
.duty-tab {
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
}

.filter-pill.is-active,
.duty-tab.is-active {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.filter-pill.is-disabled {
  opacity: 0.6;
}

.duty-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 10px;
}

.duty-note {
  margin: 12px 0 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.pharmacy-list {
  display: grid;
  gap: 18px;
  margin-bottom: 60px;
}

.non-duty-section {
  margin-top: 24px;
}

.non-duty-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  margin-bottom: 16px;
}

.non-duty-header .results-title {
  margin: 0 0 4px;
}

.non-duty-header .results-subtitle {
  margin: 0;
}

@media (max-width: 720px) {
  .non-duty-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.pharmacy-card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  overflow: visible;
  box-shadow: 0 16px 36px rgba(6, 20, 35, 0.08);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pharmacy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(6, 20, 35, 0.12);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: auto;
  margin-top: 0;
  background: #fde8e8;
  color: #b91c1c;
  border: 1px solid rgba(185, 28, 28, 0.2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
}

.card-media {
  width: 100%;
  height: 180px;
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.08), rgba(97, 222, 138, 0.18));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-soft);
}

.media-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.95);
  color: #f0fdf4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.3);
}

.media-badge--off {
  background: rgba(185, 28, 28, 0.92);
  color: #fff;
  box-shadow: 0 10px 24px rgba(185, 28, 28, 0.25);
}

.media-badge--duty {
  animation: dutyPulse 1.6s ease-in-out infinite;
}

@keyframes dutyPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.28);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 16px 32px rgba(22, 163, 74, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.28);
  }
}

.card-body {
  padding: 18px 20px;
  display: grid;
  gap: 12px;
  flex: 1 1 auto;
  width: 100%;
}

.card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 20px;
  align-items: start;
}

.card-title {
  font-family: "Inter", sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}

.card-address {
  font-size: 13px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.card-address .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
  margin-top: 0;
}

.card-extra {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-extra .pill {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-directions {
  font-size: 12px;
  color: var(--text-soft);
  font-style: italic;
}

.card-phone {
  text-align: right;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 160px;
  align-self: start;
}

.card-phone strong {
  display: block;
  font-size: 14px;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.card-status {
  display: none;
}

.card-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.route-wrap {
  position: relative;
}

.route-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 8px);
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 14px 30px rgba(6, 20, 35, 0.08);
  z-index: 5;
  white-space: nowrap;
  flex-wrap: nowrap;
  justify-content: center;
}

.route-menu-vertical {
  flex-direction: row;
  align-items: center;
  width: auto;
}

@media (max-width: 980px) {
  .route-menu {
    white-space: normal;
    max-width: min(520px, calc(100vw - 32px));
    flex-wrap: wrap;
  }
}

.route-menu-vertical .route-item {
  justify-content: flex-start;
}

@media (max-width: 720px) {
  .card-header {
    grid-template-columns: 1fr;
  }

  .card-phone {
    text-align: left;
    min-width: 0;
  }

  .card-address {
    word-break: break-word;
  }

  .card-footer {
    justify-content: flex-start;
  }

  .card-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .card-actions .action-btn,
  .card-actions .primary-btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    padding: 12px 14px;
  }

  .route-wrap {
    flex: 1 1 100%;
  }

  .route-wrap .route-btn {
    width: 100%;
  }

  .route-menu {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(360px, 100%);
    border-radius: 12px;
    justify-content: center;
  }

  .route-item {
    flex: 1 1 auto;
    justify-content: flex-start;
    padding: 10px 12px;
    font-size: 12px;
  }

  .route-menu-vertical {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    width: min(360px, 100%);
    gap: 8px;
  }
}

.route-wrap.is-open .route-menu {
  display: inline-flex;
}

.route-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--surface-2) 75%, transparent);
}

.route-item:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.route-item.google {
  background: color-mix(in srgb, #4285f4 16%, var(--surface));
  border-color: color-mix(in srgb, #4285f4 30%, var(--border));
}

.route-item.apple {
  background: color-mix(in srgb, #111827 10%, var(--surface));
  border-color: color-mix(in srgb, #111827 24%, var(--border));
}

.route-item.yandex {
  background: color-mix(in srgb, #ff1f1f 14%, var(--surface));
  border-color: color-mix(in srgb, #ff1f1f 28%, var(--border));
}

.route-logo {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.route-logo.google {
  background: #4285f4;
}

.route-logo.apple {
  background: #111827;
  font-size: 14px;
}

.route-logo.apple svg {
  width: 14px;
  height: 14px;
  fill: #fff;
  display: block;
}

.route-logo.yandex {
  background: #ff1f1f;
}

.card-phone {
  position: relative;
  z-index: 2;
}

.card-actions .action-btn,
.card-actions .primary-btn {
  position: relative;
  z-index: 1;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
}

.action-btn.call {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
}

.action-btn.detail {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
}

.primary-btn {
  border: 0;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-weight: 700;
  background: var(--accent);
  color: #0b2e18;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(39, 174, 96, 0.22);
}

.empty-state {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px dashed color-mix(in srgb, var(--border) 60%, transparent);
  color: var(--text-muted);
}

.map-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 20, 35, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.map-modal.is-open {
  display: flex;
}

.map-modal-content {
  width: 100vw;
  height: 100vh;
  background: var(--surface);
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

.map-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 2;
}

.map-canvas {
  width: 100%;
  height: 100%;
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
}

.map-notice {
  position: absolute;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  box-shadow: var(--shadow);
  z-index: 2;
}

@media (min-width: 768px) {
  .results-header {
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
  }

  .pharmacy-card {
    flex-direction: row;
  }

  .card-media {
    width: 260px;
    height: auto;
  }
}
