/* Visual CMS editor — WordPress-style click-to-edit on draft site */
html.cms-editing body {
  padding-top: 58px;
}

html.cms-editing .draft-banner {
  top: 58px;
}

.cms-editor-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000000002;
  min-height: 58px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.55rem 1rem;
  background: #1a140c;
  color: #fff;
  border-bottom: 3px solid #b37e1f;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  font-family: "Jost", system-ui, sans-serif;
}

.cms-editor-bar__brand {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.cms-editor-bar__brand span {
  color: #b37e1f;
}

.cms-editor-bar__hint {
  flex: 1 1 180px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
}

.cms-editor-bar__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cms-editor-bar__page {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.cms-editor-bar__page.is-active,
.cms-editor-bar__page:hover {
  border-color: #b37e1f;
  background: rgba(179, 126, 31, 0.2);
  color: #fff;
}

.cms-editor-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cms-editor-bar__btn {
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cms-editor-bar__btn--gold {
  background: #b37e1f;
  color: #fff;
}

.cms-editor-bar__btn--gold:hover {
  background: #c69025;
}

.cms-editor-bar__btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.cms-editor-bar__btn--ghost:hover {
  border-color: #b37e1f;
  color: #b37e1f;
}

.cms-editor-bar__status {
  width: 100%;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  min-height: 1em;
}

.cms-editor-bar__status.is-dirty {
  color: #f0c674;
}

.cms-editor-bar__status.is-ok {
  color: #8fd694;
}

.cms-editor-bar__status.is-error {
  color: #ff8a80;
}

html.cms-editing [data-cms-path] {
  position: relative;
  transition: outline-color 0.15s ease, box-shadow 0.15s ease;
  pointer-events: auto;
}

html.cms-editing .gallery-item-card a,
html.cms-editing #footer a,
html.cms-editing .reviews-lite__cta,
html.cms-editing .top-order-btn,
html.cms-editing [data-open-order],
html.cms-editing .catering-teaser__btn,
html.cms-editing .catering-phone-link,
html.cms-editing .catering-page__back a {
  pointer-events: none;
}

html.cms-editing .cms-editor-bar a,
html.cms-editing .cms-editor-bar button,
html.cms-editing .cms-editor-bar__page,
html.cms-editing [data-cms-path] {
  pointer-events: auto;
}

html.cms-editing [data-cms-path].cms-editable:hover {
  outline: 2px dashed #b37e1f;
  outline-offset: 3px;
  cursor: text;
  box-shadow: 0 0 0 4px rgba(179, 126, 31, 0.12);
}

html.cms-editing [data-cms-kind="image"].cms-editable:hover {
  cursor: pointer;
}

html.cms-editing [data-cms-path].cms-editing-active {
  outline: 2px solid #b37e1f;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(179, 126, 31, 0.16);
}

html.cms-editing [data-cms-path][contenteditable="true"] {
  cursor: text;
  outline: 2px solid #b37e1f;
  outline-offset: 3px;
  min-width: 0.5em;
  -webkit-user-modify: read-write;
  user-select: text;
}

.cms-edit-label {
  position: absolute;
  top: -1.35rem;
  left: 0;
  z-index: 2;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  background: #b37e1f;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
  font-family: "Jost", system-ui, sans-serif;
}

.cms-image-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000003;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cms-image-modal[hidden] {
  display: none !important;
}

.cms-image-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 20, 12, 0.72);
}

.cms-image-modal__panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  font-family: "Jost", system-ui, sans-serif;
}

.cms-image-modal__panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.cms-image-modal__panel p {
  margin: 0 0 1rem;
  color: #6b6358;
  font-size: 0.88rem;
}

.cms-image-modal__preview {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.85rem;
  border: 1px solid #e8e0d4;
}

.cms-image-modal__field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.cms-image-modal__field span {
  font-size: 0.8rem;
  font-weight: 700;
}

.cms-image-modal__field input[type="text"],
.cms-image-modal__field input[type="url"] {
  width: 100%;
  border: 1px solid #e8e0d4;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font: inherit;
}

.cms-image-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cms-image-modal__btn {
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cms-image-modal__btn--primary {
  background: #b37e1f;
  color: #fff;
}

.cms-image-modal__btn--secondary {
  background: #f5f2eb;
  color: #1a140c;
}

.cms-login-gate {
  position: fixed;
  inset: 0;
  z-index: 1000000004;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(26, 20, 12, 0.88);
  font-family: "Jost", system-ui, sans-serif;
}

.cms-login-gate__panel {
  max-width: 420px;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 1.75rem;
  text-align: center;
}

.cms-login-gate__panel h1 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.cms-login-gate__panel p {
  margin: 0 0 1.25rem;
  color: #6b6358;
  line-height: 1.5;
}

.cms-login-gate__panel a {
  display: inline-block;
  background: #b37e1f;
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
}

@media (max-width: 640px) {
  html.cms-editing body {
    padding-top: 96px;
  }

  .cms-editor-bar__hint {
    order: 3;
    width: 100%;
  }
}
