.layerimg-pod {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 16px 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  --lp-border: color-mix(in srgb, currentColor 28%, transparent);
  --lp-muted: color-mix(in srgb, currentColor 55%, transparent);
  --lp-surface: color-mix(in srgb, currentColor 6%, transparent);
  --lp-radius: 6px;
}

.layerimg-pod[hidden] {
  display: none;
}

.layerimg-pod-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.layerimg-pod-label {
  font-weight: 600;
}

.layerimg-pod-required {
  margin-left: 2px;
}

.layerimg-pod input[type="text"],
.layerimg-pod input[type="email"],
.layerimg-pod input[type="tel"],
.layerimg-pod input[type="date"],
.layerimg-pod input[type="time"],
.layerimg-pod input[type="file"],
.layerimg-pod select,
.layerimg-pod textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  background: transparent;
  color: inherit;
  font: inherit;
}

.layerimg-pod textarea {
  min-height: 88px;
}

/* 原生图标拉满整行才能整框点开，但图标会跟着被撑大。所以把它藏掉，
   只留点击，旁边另放一个 16px 的图标。 */
.layerimg-pod-picker {
  position: relative;
}

.layerimg-pod-picker input {
  padding-right: 36px;
  cursor: pointer;
}

.layerimg-pod-picker-icon {
  position: absolute;
  top: 0;
  right: 10px;
  bottom: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  color: inherit;
}

.layerimg-pod-picker-icon svg {
  display: block;
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 auto;
}

.layerimg-pod input[type="date"]::-webkit-calendar-picker-indicator,
.layerimg-pod input[type="time"]::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}

.layerimg-pod-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.layerimg-pod-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border: 1.5px solid var(--lp-border);
  border-radius: var(--lp-radius);
  background: var(--lp-surface);
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.layerimg-pod-choice input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.layerimg-pod-choice.no-img {
  padding: 8px 14px;
  font-size: 13px;
}

.layerimg-pod-color {
  display: block;
  width: 64px;
  height: 64px;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.layerimg-pod-choice.is-selected {
  border-color: currentColor;
  box-shadow: 0 0 0 1px currentColor;
}

.layerimg-pod-thumb {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.layerimg-pod-caption {
  display: block;
  max-width: 72px;
  padding: 4px 6px 6px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layerimg-pod-price-badge {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 1px 4px;
  border-radius: 3px;
  background: color-mix(in srgb, currentColor 72%, transparent);
  color: #fff;
  font-size: 10px;
  line-height: 1.4;
  pointer-events: none;
}

.layerimg-pod-tiled {
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  background: var(--lp-surface);
  padding: 8px 12px;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.layerimg-pod-tiled.is-selected {
  border-color: currentColor;
  box-shadow: 0 0 0 1px currentColor;
}

.layerimg-pod-error {
  margin: 0;
  color: #8e1f0b;
  font-size: 13px;
}

.layerimg-pod hr {
  width: 100%;
  border: 0;
  border-top: 1px solid #e1e3e5;
}

.layerimg-pod-choice.is-link {
  color: inherit;
  text-decoration: none;
}

.layerimg-pod-choice.is-link.no-img {
  text-decoration: underline;
}

.layerimg-pod input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: currentColor;
  cursor: pointer;
}

.layerimg-pod-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  background: var(--lp-surface);
  cursor: pointer;
}

.layerimg-pod-checkbox-image {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}

.layerimg-pod-price-tag {
  font-size: 12px;
  color: var(--lp-muted);
}

.layerimg-pod-addon-notice {
  margin: 0;
  font-size: 12px;
  color: var(--lp-muted);
}

.layerimg-pod-addon-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.layerimg-pod-addon-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  padding: 8px 10px;
  font-size: 13px;
}

.layerimg-pod-addon-image {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}

.layerimg-pod-addon-caption {
  flex: 1;
  min-width: 0;
}

.layerimg-pod-guide-title {
  display: block;
  margin-top: 6px;
}

.layerimg-pod-guide-image {
  display: block;
  max-width: 100%;
  max-height: 200px;
  margin-top: 8px;
  border-radius: 6px;
  object-fit: contain;
}

.layerimg-pod-upload {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.layerimg-pod-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.layerimg-pod-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  margin: 0;
  padding: 14px;
  border: 1.5px dashed var(--lp-border);
  border-radius: var(--lp-radius);
  background: var(--lp-surface);
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.layerimg-pod-upload-btn[hidden] {
  display: none;
}

.layerimg-pod-upload-hint {
  margin: 0;
  font-size: 12px;
  color: var(--lp-muted);
}

.layerimg-pod-upload-hint[hidden] {
  display: none;
}

.layerimg-pod-upload-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}

.layerimg-pod-upload-preview[hidden] {
  display: none;
}

.layerimg-pod-upload-thumb {
  width: 72px;
  height: 72px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  object-fit: cover;
  flex-shrink: 0;
}

.layerimg-pod-upload-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.layerimg-pod-upload-name {
  font-size: 13px;
  word-break: break-all;
}

.layerimg-pod-upload-done {
  font-size: 13px;
  color: #2a7d4f;
}

.layerimg-pod-upload-done[hidden] {
  display: none;
}

.layerimg-pod-upload-actions {
  display: flex;
  gap: 12px;
}

.layerimg-pod-upload-action {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.layerimg-pod-upload-action.is-remove {
  color: #8e1f0b;
}

.layerimg-pod-upload-status {
  font-size: 12px;
  color: var(--lp-muted);
}

.layerimg-pod-upload-status.is-error {
  color: #8e1f0b;
}

.layerimg-pod-zoom {
  position: fixed;
  z-index: 2147483000;
  display: none;
  padding: 6px;
  border-radius: 4px;
  background: #111;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.layerimg-pod-zoom.is-visible {
  display: block;
}

.layerimg-pod-zoom-title {
  max-width: 220px;
  padding: 2px 4px 6px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layerimg-pod-zoom img {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
  background: #fff;
}

.layerimg-pod-zoom::after {
  content: "";
  position: absolute;
  top: 100%;
  left: var(--layerimg-zoom-arrow, 50%);
  border: 7px solid transparent;
  border-top-color: #111;
  transform: translateX(-50%);
}

.layerimg-pod-zoom.is-below::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: #111;
}
