* {
  padding: 0;
  margin: 0;
}

.page {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: #fff;
  position: relative;
}

/* ----- Header ----- */
.header {
  z-index: 2;
  padding: 12px 16px 10px;
  flex-shrink: 0;
  background: #fff;
}

.step-tag {
  font-size: 13px;
  font-weight: 500;
  color: #3d9e4a;
  margin-bottom: 6px;
}

.page-title {
  font-size: 18px;
  font-weight: 600;
  color: #222;
  margin-bottom: 12px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ececec;
  border-radius: 999px;
  padding: 10px 14px;
}

.search-wrap svg {
  flex-shrink: 0;
  opacity: 0.45;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #333;
  outline: none;
}

.search-input::placeholder {
  color: #999;
}

/* ----- Map block ----- */
.map-block {
  /* flex: 1; */
  position: absolute;
  /* min-height: 220px; */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  bottom: 80px;
}

.map-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: revert-layer;
}

/* 隐藏地图左下角 logo / 版权条（高德 DOM 类名） */
#amap-container .amap-logo,
#amap-container .amap-copyright {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.map-overlay {
  position: relative;
  z-index: 2;
  margin: 8px 12px 0;
  padding: 12px 14px 12px 12px;
  background: rgba(45, 65, 50, 0.78);
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  line-height: 1.55;
  transition: padding 0.2s ease;
  max-width: calc(100vw - 24px);
  overflow: hidden;
}

.map-overlay.is-collapsed {
  padding-top: 10px;
  padding-bottom: 10px;
  padding: 12px 9px;
}

.map-overlay-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}

.map-overlay-toggle svg {
  transition: transform 0.2s ease;
}

.map-overlay.is-collapsed .map-overlay-toggle {
  top: 50%;
  transform: translateY(-50%);
}

.map-overlay.is-collapsed .map-overlay-toggle svg {
  transform: rotate(180deg);
}

.map-overlay-body {
  overflow: hidden;
  transition:
    max-height 0.28s ease,
    opacity 0.2s ease;
  max-height: 320px;
  opacity: 1;
}

.map-overlay.is-collapsed .map-overlay-body {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.map-overlay-preview {
  display: none;
  margin: 0;
  /* padding: 0 28px 0 0; */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.55;
  color: #fff;
  padding-right: 28px;
  max-width: 100%;
}

.map-overlay.is-collapsed .map-overlay-preview:not([hidden]) {
  display: block;
}

.map-overlay ol {
  padding-left: 0;
  margin: 0;
  list-style-position: inside;
}

.map-overlay li {
  margin-bottom: 6px;
}

.map-overlay li:last-child {
  margin-bottom: 0;
}

/* ----- Bottom sheet + list ----- */
.sheet {
  position: relative;
  z-index: 3;
  max-height: 400px;
  bottom: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
  margin: 2px 12px 0;
}

.sheet-handle {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
  color: #bbb;
}

.sheet-selected {
  text-align: center;
  font-size: 14px;
  color: #555;
  padding: 4px 16px 10px;
}

.sheet-selected strong {
  color: #333;
  font-weight: 600;
}

.location-list {
  list-style: none;
  max-height: 37vh;
  min-height: 26vh;
  overflow-y: auto;
  padding: 0 0 8px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE / 旧版 Edge */
}
.location-list > :last-child {
  margin-bottom: 150px;
}

.location-list::-webkit-scrollbar {
  display: none; /* Chrome / Safari */
  width: 0;
  height: 0;
}

.location-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid #eee;
  cursor: pointer;
  transition: background 0.15s ease;
}

.location-item:first-child {
  border-top: none;
}

.location-item.is-selected:not(.is-disabled) {
  background: #e8f5e9;
}

.location-item.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  color: #888;
}

.location-item.is-disabled .location-name,
.location-item.is-disabled .location-capacity,
.location-item.is-disabled .location-price,
.location-item.is-disabled .location-price-unit {
  color: #888;
}

.location-item.is-disabled .location-icon svg {
  opacity: 0.65;
}

.location-item.location-empty {
  justify-content: center;
  cursor: default;
  color: #888;
  font-size: 14px;
}

.location-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: block;
}

.location-icon svg {
  display: block;
  width: 44px;
  height: 44px;
}

.location-body {
  flex: 1;
  min-width: 0;
}

.location-name {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 4px;
}

.location-capacity {
  font-size: 13px;
  color: #e53935;
}

.location-price-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  max-width: 42%;
  text-align: right;
}

.location-price {
  font-size: 15px;
  font-weight: 600;
  color: #e53935;
}

.location-price-unit {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: #666;
  word-break: break-word;
}

/* ----- Footer ----- */
.footer {
  position: absolute;
  width: 100%;
  bottom: 0;
  z-index: 3;
  height: 150px;
  background: url("../images/buttonbgImg.png") no-repeat center center;
  background-size: 100% 100%;
  display: flex;
  flex-direction: row;
  align-content: center;
  justify-content: center;
  align-items: center;
}
.footer-wrap {
  position: relative;
  flex-shrink: 0;
  padding: 0 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-deco {
  width: 73%;
  height: 100px;
  background: url("../images/buttonImg.png") no-repeat center center;
  background-size: 100% 100%;
  display: flex;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 11px;
}

.btn-adopt {
  border: none;
  width: 100%;
  font-size: 30px;
  background: transparent;
  color: #ffff;
}

.btn-adopt:active {
  transform: scale(0.98);
  opacity: 0.95;
}

.location-price-unit {
  font-size: 12px;
  margin-top: 9px;
}
.location-price {
  text-align: right;
}
