/* City landing visual editor */
body.landing-edit-mode {
  padding-bottom: 5.5rem;
}
body.landing-edit-mode #hero-parallax,
body.landing-edit-mode [data-landing-canvas] {
  outline: 1px dashed rgba(22, 101, 52, 0.35);
  outline-offset: 4px;
}
body.landing-edit-mode [data-landing-item] {
  cursor: grab;
  outline: 2px solid transparent;
  outline-offset: 2px;
  touch-action: none;
}
body.landing-edit-mode [data-landing-item]:hover {
  outline-color: rgba(22, 101, 52, 0.45);
}
body.landing-edit-mode [data-landing-item].is-selected {
  outline-color: #166534;
  /* Do NOT bump z-index here — it was being saved as layer 60 and burying color blocks */
}
body.landing-edit-mode [data-landing-item].is-dragging {
  cursor: grabbing;
  opacity: 0.92;
}
body.landing-edit-mode [data-landing-item] img {
  pointer-events: auto;
  -webkit-user-drag: none;
  user-select: none;
}
body.landing-edit-mode [data-landing-figure] {
  outline: 2px dashed rgba(22, 101, 52, 0.75);
  outline-offset: 2px;
  background-color: transparent;
  min-height: 48px;
  pointer-events: auto !important;
}
body.landing-edit-mode [data-landing-figure].hidden {
  display: block !important;
}
body.landing-edit-mode [data-landing-figure] img {
  pointer-events: auto !important;
}
body.landing-edit-mode [data-landing-figure]::after {
  content: "заменить";
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  z-index: 5;
  font: 700 10px/1 "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(22, 101, 52, 0.9);
  padding: 4px 8px;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
body.landing-edit-mode [data-landing-figure]:hover,
body.landing-edit-mode [data-landing-figure].is-selected {
  outline-color: #166534;
  outline-style: solid;
}
body.landing-edit-mode [data-landing-figure].is-empty-figure {
  outline-color: #b45309;
  background-color: rgba(254, 243, 199, 0.55);
}
body.landing-edit-mode [data-landing-figure].is-empty-figure::after {
  content: "добавить фото";
  background: rgba(180, 83, 9, 0.95);
}
.landing-edit-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #166534;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  z-index: 70;
  touch-action: none;
}
.landing-edit-handle--nw {
  left: -7px;
  top: -7px;
  cursor: nwse-resize;
}
.landing-edit-handle--ne {
  right: -7px;
  top: -7px;
  cursor: nesw-resize;
}
.landing-edit-handle--sw {
  left: -7px;
  bottom: -7px;
  cursor: nesw-resize;
}
.landing-edit-handle--se {
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
}
.landing-edit-toolbar {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  max-width: calc(100% - 1.5rem);
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 35, 28, 0.94);
  color: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.8rem;
}
.landing-edit-toolbar button,
.landing-edit-toolbar label.landing-edit-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  white-space: nowrap;
}
.landing-edit-toolbar button:hover,
.landing-edit-toolbar label.landing-edit-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.landing-edit-toolbar button.primary {
  background: #22c55e;
  color: #052e16;
}
.landing-edit-toolbar button.danger {
  background: rgba(248, 113, 113, 0.25);
  color: #fecaca;
}
.landing-edit-toolbar .landing-edit-status {
  opacity: 0.75;
  padding: 0 0.35rem;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.landing-edit-toolbar input[type="file"] {
  display: none;
}
.landing-edit-layer {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.15rem;
}
.landing-edit-layer button {
  min-width: 2rem;
  padding: 0.45rem 0.55rem;
}
.landing-edit-z {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}
.landing-edit-z input[type="number"] {
  width: 3.2rem;
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.45rem;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-align: center;
}
.landing-edit-z input[type="number"]:disabled {
  opacity: 0.4;
}
.landing-edit-z input[type="number"]::-webkit-outer-spin-button,
.landing-edit-z input[type="number"]::-webkit-inner-spin-button {
  opacity: 1;
}
.landing-edit-open {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 9990;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: #166534;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 10px 28px rgba(22, 101, 52, 0.35);
  cursor: pointer;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}
.landing-edit-open:hover {
  background: #14532d;
}

/* Preview: hide all editor chrome, keep page looking public */
body.landing-preview-mode {
  padding-bottom: 0;
}
body.landing-preview-mode #hero-parallax,
body.landing-preview-mode [data-landing-canvas],
body.landing-preview-mode [data-landing-item],
body.landing-preview-mode [data-landing-figure],
body.landing-preview-mode [data-landing-figure].is-empty-figure,
body.landing-preview-mode [data-landing-item].is-selected,
body.landing-preview-mode [data-landing-item]:hover {
  outline: none !important;
  cursor: default !important;
  /* Do NOT reset background — color blocks (esp. hero-green) use bg on the item itself */
}
body.landing-preview-mode [data-landing-figure] {
  /* Only clear the editor checker/placeholder fill, keep real photos */
  background-image: none !important;
}
body.landing-preview-mode [data-landing-figure]:not([data-landing-bg]) {
  background-color: transparent !important;
}
body.landing-preview-mode [data-landing-figure]::after {
  display: none !important;
}
body.landing-preview-mode .landing-edit-handle,
body.landing-preview-mode .landing-edit-toolbar {
  display: none !important;
}
.landing-preview-exit {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 10000;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  background: rgba(15, 35, 28, 0.94);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}
.landing-preview-exit:hover {
  background: #166534;
}
