.delivery-container {
  padding: 12px 10px 90px;
  max-width: 560px;
  margin: 0 auto;
}

.delivery-card {
  background: #fff;
  border-radius: 14px;
  padding: 0 14px 14px;
  box-shadow: 0 4px 18px rgb(0 78 40 / 18%);
  overflow: hidden;
}

.delivery-tab-row {
  display: flex;
  margin: 0 -14px 12px;
}

.delivery-tab {
  flex: 1;
  padding: 12px 0;
  border: none;
  background: #e1f3ea;
  color: #666;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  position: relative;
}

.delivery-tab:first-child {
  border-radius: 0 0 22px 0;
}

.delivery-tab:last-child {
  border-radius: 0 0 0 22px;
}

.delivery-tab.active {
  background: #fff;
  color: #25c072;
}

.delivery-tab.active::after {
  content: '';
  position: absolute;
  left: 26%;
  right: 26%;
  bottom: 6px;
  height: 3px;
  border-radius: 3px;
  background: #ff9800;
}

.delivery-map-box {
  position: relative;
  height: 230px;
  border: 1px solid #b6e3cc;
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  background: #f2faf5;
}

.delivery-map-box[hidden] {
  display: none;
}

/* 让地图框独占触摸手势：单指拖地图、双指缩放，不再触发页面滚动/页面缩放 */
.delivery-map-box,
.delivery-map-box * {
  touch-action: none;
}

/* 天地图 SDK 的瓦片层自带很高 z-index，画布必须自成堆叠上下文，
   否则瓦片会盖住同级的按钮、中心针和审图号 */
.delivery-map-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  isolation: isolate;
}

/* 中心选点大头针：固定在地图框正中，地图动、针不动，针尖即选定位置 */
.delivery-map-center-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 21;
  width: 26px;
  height: 34px;
  transform: translate(-50%, -100%);
  pointer-events: none;
}

.delivery-map-center-pin span {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #25c072;
  box-shadow: 0 2px 6px rgb(0 0 0 / 30%);
  transform: rotate(-45deg);
}

.delivery-map-center-pin span::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.delivery-map-center-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 21;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #25c072;
  box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
  pointer-events: none;
}

.delivery-map-locate {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
  padding: 6px 10px;
  border: 1px solid #25c072;
  border-radius: 6px;
  background: #fff;
  color: #1d9e6a;
  font-size: 12px;
  cursor: pointer;
}

/* 天地图 JS API 会自动在地图容器里插入版权控件（logo 图片 + 审图号文字），
   本页改用下方一行极小的纯文字标注，不展示 SDK 自带的整块控件。
   三个特征选择器互相兜底，SDK 异步插入也同样生效；
   不改动 SDK，也不需要 JS 去生成或改写任何 DOM 内容。 */
.delivery-map-box div[style*='height:24px'],
.delivery-map-box img[src*='logo.png'],
.delivery-map-box div[style*='nowrap'] {
  display: none !important;
}

/* 本页自己的审图号：9px 纯文字，放在地图框角落，不挡操作、不破坏干净界面 */
.delivery-map-attribution {
  position: absolute;
  bottom: 2px;
  left: 4px;
  z-index: 21;
  padding: 1px 3px;
  border-radius: 3px;
  background: rgb(255 255 255 / 75%);
  color: #9aa8a0;
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

.delivery-county-fallback {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  border: none;
  background: none;
  color: #1d9e6a;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.delivery-county-fallback[hidden] {
  display: none;
}

.rider-county-tip {
  margin: 0 0 8px;
  font-size: 12px;
  color: #5a9c7b;
  line-height: 1.5;
}

.rider-county-tip-error {
  color: #e08600;
}

.delivery-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.delivery-form-row {
  position: relative;
  display: flex;
  align-items: flex-start;
}

.delivery-form-label {
  flex: 0 0 40px;
  font-size: 13px;
  color: #25c072;
  font-weight: bold;
  margin: 0 8px 0 0;
  line-height: 38px;
}

.delivery-form-row input,
.delivery-form-row textarea {
  width: 100%;
  height: 38px;
  background: #fff;
  border: 1px solid #25c072;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  box-sizing: border-box;
  color: #333;
}

.delivery-form-row > input,
.delivery-form-row > textarea {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
}

.delivery-form-row textarea {
  height: auto;
  padding: 8px 12px;
  resize: none;
  line-height: 1.5;
}

.delivery-status {
  display: none;
  margin-top: 10px;
  border-radius: 8px;
  padding: 10px 12px;
  background: #e8f7ef;
  border: 1px solid #b6e3cc;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.delivery-status.show {
  display: flex;
}

.delivery-status-text {
  font-size: 14px;
  color: #1d9e6a;
  font-weight: bold;
}

.delivery-status.busy .delivery-status-text {
  color: #ff9800;
}

.delivery-status-timer {
  font-size: 14px;
  color: #ff9800;
  font-weight: bold;
  white-space: nowrap;
}

.delivery-cancel-btn {
  flex: none;
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid #f0b8a8;
  border-radius: 6px;
  background: #fff;
  color: #e35d3f;
  font-size: 12px;
  line-height: 1.4;
}

.delivery-cancel-btn[hidden] {
  display: none;
}

.delivery-action-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 14px;
}

.delivery-submit {
  display: block;
  width: 30%;
  margin-top: 0;
  padding: 6px 0;
  border: none;
  border-radius: 8px;
  background-color: #ffffff;
  color: #ff9800;
  border: 1px solid #ff9800;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.delivery-orders-btn {
  display: block;
  width: 30%;
  margin-top: 0;
  padding: 6px 0;
  border: none;
  border-radius: 8px;
  background-color: #ffffff;
  color: #ff9800;
  border: 1px solid #ff9800;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}
