/* Explicit editor line breaks also work under the strict style-src 'self' CSP. */
body [data-frontend-multiline] { white-space: pre-line !important; }

.frontend-admin-toolbar {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  min-height: 52px;
  padding: 7px max(14px, calc((100vw - 1420px) / 2));
  color: #fff;
  background: #18132b;
  box-shadow: 0 7px 22px rgba(24,19,43,.22);
  font: 750 14px/1.2 Manrope,Arial,sans-serif;
}
.frontend-admin-toolbar > div { min-height: 38px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.frontend-admin-toolbar strong { margin-right: auto; font-family: Montserrat,Arial,sans-serif; }
.frontend-admin-toolbar a,
.frontend-admin-toolbar label { min-height: 38px; padding: 0 14px; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; background: rgba(255,255,255,.12); cursor: pointer; }
.frontend-admin-toolbar a:hover,
.frontend-admin-toolbar label:hover { background: rgba(255,255,255,.2); }
.frontend-admin-toolbar input { width: 18px; height: 18px; accent-color: #f70076; }
body.has-frontend-admin-toolbar { padding-top: 52px; }
/* Keep the authenticated toolbar available even when checkout requires a previous step. */
body.cart-page.has-frontend-admin-toolbar > .frontend-admin-toolbar[data-frontend-admin-ui] { display: block !important; }
body.frontend-edit-mode .frontend-editable-text { outline: 2px dashed rgba(247,0,118,.62); outline-offset: 3px; border-radius: 3px; cursor: text !important; }
body.frontend-edit-mode .frontend-editable-text:hover { outline-color: #f70076; background: rgba(247,0,118,.08); }

.frontend-editor-dialog { width: min(640px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 22px; color: #18132b; background: #fff; box-shadow: 0 32px 90px rgba(24,19,43,.32); }
.frontend-editor-dialog::backdrop { background: rgba(24,19,43,.62); backdrop-filter: blur(5px); }
.frontend-editor-dialog__panel { padding: 24px; display: grid; gap: 18px; }
.frontend-editor-dialog header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.frontend-editor-dialog header small { color: #f70076; font-size: 14px; font-weight: 900; letter-spacing: .08em; }
.frontend-editor-dialog h2 { margin: 5px 0 0; font: 900 27px/1.15 Montserrat,Arial,sans-serif; }
.frontend-editor-dialog [data-editor-close] { width: 42px; height: 42px; border: 1px solid #e7dfe4; border-radius: 50%; color: #18132b; background: #fff; font-size: 24px; cursor: pointer; }
.frontend-editor-dialog label { display: grid; gap: 7px; color: #5d525a; font-size: 14px; font-weight: 800; }
.frontend-editor-dialog textarea,
.frontend-editor-dialog input[type="number"] { width: 100%; border: 1px solid #dcd2d8; border-radius: 12px; color: #18132b; background: #fff; font: 650 16px/1.5 Manrope,Arial,sans-serif; }
.frontend-editor-dialog textarea { min-height: 130px; padding: 12px; resize: vertical; }
.frontend-editor-dialog input[type="number"] { height: 48px; padding: 0 12px; }
.frontend-editor-dialog input[type="color"] { width: 74px; height: 48px; padding: 3px; border: 1px solid #dcd2d8; border-radius: 10px; background: #fff; }
.frontend-editor-dialog__format { display: grid; grid-template-columns: 1fr 110px 1.25fr; gap: 12px; align-items: end; }
.frontend-editor-dialog__reset { min-height: 48px; display: flex !important; grid-auto-flow: column; align-items: center; justify-content: flex-start; }
.frontend-editor-dialog__reset input { width: 19px; height: 19px; accent-color: #f70076; }
.frontend-editor-dialog [data-editor-status] { min-height: 22px; margin: 0; color: #a02750; font-size: 14px; }
.frontend-editor-dialog footer { display: flex; justify-content: flex-end; gap: 10px; }
.frontend-editor-dialog footer button { min-height: 46px; padding: 0 18px; border: 1px solid #ded5da; border-radius: 11px; color: #18132b; background: #fff; font: 850 14px Manrope,Arial,sans-serif; cursor: pointer; }
.frontend-editor-dialog footer .frontend-editor-save { border-color: #f70076; color: #fff; background: #f70076; }
.frontend-editor-dialog footer button:disabled { opacity: .55; cursor: wait; }
.frontend-editor-toast { position: fixed; z-index: 1100; right: 18px; bottom: 18px; max-width: min(420px, calc(100vw - 36px)); padding: 14px 17px; border-radius: 13px; color: #fff; background: #0a785c; box-shadow: 0 16px 42px rgba(24,19,43,.24); font: 750 14px/1.45 Manrope,Arial,sans-serif; opacity: 0; pointer-events: none; transform: translateY(12px); transition: .18s ease; }
.frontend-editor-toast[data-tone="error"] { background: #a02750; }
.frontend-editor-toast.is-visible { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .frontend-admin-toolbar > div { justify-content: stretch; gap: 7px; }
  .frontend-admin-toolbar strong { display: none; }
  .frontend-admin-toolbar a,
  .frontend-admin-toolbar label { flex: 1; justify-content: center; padding-inline: 8px; font-size: 14px; }
  .frontend-admin-toolbar--product > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .frontend-admin-toolbar--product label { grid-column: 1 / -1; }
  .frontend-admin-toolbar--product a { min-width: 0; text-align: center; font-size: 13px; }
  body.has-frontend-product-toolbar { padding-top: 97px; }
  .frontend-editor-dialog__format { grid-template-columns: 1fr 100px; }
  .frontend-editor-dialog__reset { grid-column: 1 / -1; }
}
