/* ===== material-editor-v2-2026-08-20 =====
   Jeden Canvas jest podglądem i źródłem finalnego PNG. Narzędzia są
   mobile-first, semantyczne i celowo węższe niż pełna aplikacja graficzna. */
.editor-v2-visual {
  display: grid;
  place-items: center;
  background: #100742;
}

.editor-v2-source {
  display: none !important;
}

.material-editor-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  background: #100742;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.material-editor-canvas:active {
  cursor: grabbing;
}

.material-editor-canvas:focus-visible {
  outline: 4px solid #ff9c35;
  outline-offset: -4px;
}

.editor-v2-canvas-hint {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 7px 10px;
  color: #fff;
  background: rgba(8, 3, 40, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  pointer-events: none;
}

.editor-v2-panel-host {
  padding: 0;
  overflow: hidden;
  background: #f7f4fa;
}

.editor-v2-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  background: #fff;
  border-bottom: 1px solid #e5dee9;
}

.editor-v2-toolbar > span {
  min-width: 0;
  color: #716978;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.editor-v2-toolbar > span.is-conflict {
  color: #9b341f;
}

.editor-v2-toolbar > div {
  flex: 0 0 auto;
  display: flex;
  gap: 5px;
}

.editor-v2-toolbar button,
.editor-v2-tabs button,
.editor-v2-suggestions button,
.editor-v2-template-grid button,
.editor-v2-fonts button,
.editor-v2-align button,
.editor-v2-element-list button,
.editor-v2-brand-row button,
.editor-v2-palette button,
.editor-v2-wide-action {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.editor-v2-toolbar button {
  padding: 7px 9px;
  color: #713812;
  background: #fff0df;
  border: 1px solid #ffd0a4;
}

.editor-v2-toolbar button:disabled {
  opacity: 0.38;
  cursor: default;
}

.editor-v2-tabs {
  display: flex;
  gap: 5px;
  padding: 7px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  background: #e9e3ef;
}

.editor-v2-tabs::-webkit-scrollbar {
  display: none;
}

.editor-v2-tabs button {
  flex: 1 0 82px;
  padding: 7px 9px;
  color: #62596b;
  background: transparent;
  border: 0;
}

.editor-v2-tabs button[aria-selected="true"] {
  color: #8a3c0a;
  background: #fff;
  box-shadow: 0 4px 14px rgba(47, 24, 69, 0.1);
}

.editor-v2-panel {
  padding: 16px 13px max(18px, env(safe-area-inset-bottom));
}

.editor-v2-panel[hidden] {
  display: none;
}

.editor-v2-heading {
  margin: 2px 0 9px;
  color: #4d4454;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.editor-v2-suggestions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.editor-v2-suggestions button {
  min-width: 0;
  min-height: 122px;
  display: grid;
  grid-template-rows: 62px auto auto;
  gap: 4px;
  padding: 7px;
  color: #4d4454;
  background: #fff;
  border: 2px solid #e0d9e5;
  text-align: left;
}

.editor-v2-suggestions button[aria-pressed="true"],
.editor-v2-template-grid button[aria-pressed="true"],
.editor-v2-fonts button[aria-pressed="true"],
.editor-v2-align button[aria-pressed="true"] {
  color: #7c3406;
  background: #fff3e7;
  border-color: #ff8a1f;
  box-shadow: 0 0 0 2px rgba(255, 138, 31, 0.14);
}

.editor-v2-suggestions b,
.editor-v2-suggestions small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-v2-suggestions small {
  color: #837988;
  font-size: 10px;
}

.editor-template-thumb {
  position: relative;
  overflow: hidden;
  display: block;
  background: linear-gradient(145deg, #15084e, #8c54dd 60%, #ff8a1f);
  border-radius: 8px;
}

.editor-template-thumb::before,
.editor-template-thumb::after {
  content: "";
  position: absolute;
  display: block;
}

.editor-template-bold-retail::before {
  inset: 0 42% 0 0;
  background: rgba(255, 255, 255, 0.82);
}

.editor-template-bold-retail::after {
  width: 38%;
  height: 9%;
  left: 9%;
  top: 30%;
  background: #111;
  box-shadow: 0 10px 0 #111, 0 25px 0 #ff8a1f;
}

.editor-template-editorial-product::before {
  width: 45%;
  height: 46%;
  top: 15%;
  right: 7%;
  border-top: 5px solid #fff;
  border-bottom: 3px solid #fff;
}

.editor-template-editorial-product::after {
  width: 48%;
  height: 30%;
  right: 0;
  bottom: 9%;
  background: rgba(255, 196, 130, 0.75);
  border-radius: 9px 0 0 9px;
}

.editor-template-launch-frame::before {
  inset: 13%;
  border: 3px solid #fff;
}

.editor-template-launch-frame::after {
  width: 62%;
  height: 4px;
  left: 19%;
  top: 9%;
  background: #fff;
  box-shadow: 0 45px 0 #fff;
}

.editor-v2-details {
  margin-top: 14px;
  color: #514958;
}

.editor-v2-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.editor-v2-template-grid,
.editor-v2-fonts,
.editor-v2-element-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.editor-v2-template-grid button,
.editor-v2-fonts button,
.editor-v2-align button,
.editor-v2-element-list button {
  min-width: 0;
  padding: 8px 9px;
  color: #5d5464;
  background: #fff;
  border: 1px solid #ddd5e2;
}

.editor-v2-element-list button {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.editor-v2-element-list button[aria-pressed="true"] span {
  color: #14845b;
}

.editor-v2-field,
.editor-v2-range,
.editor-v2-color {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
  color: #554c5c;
  font-size: 13px;
  font-weight: 850;
}

.editor-v2-field input,
.editor-v2-field textarea,
.editor-v2-field select,
.editor-v2-range input,
.editor-v2-color input {
  width: 100%;
  min-height: 48px;
  color: #211a27;
  background: #fff;
  border: 1px solid #d9d1df;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
}

.editor-v2-field input,
.editor-v2-field textarea,
.editor-v2-field select {
  padding: 11px 12px;
}

.editor-v2-field textarea {
  min-height: 96px;
  line-height: 1.45;
  resize: vertical;
}

.editor-v2-range > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.editor-v2-range output {
  color: #9a470d;
}

.editor-v2-range input {
  padding-inline: 2px;
  accent-color: #ff8a1f;
}

.editor-v2-color input {
  padding: 4px;
}

.editor-v2-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  align-items: end;
  gap: 9px;
}

.editor-v2-focus {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-v2-align {
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 13px;
}

.editor-v2-align button {
  min-width: 0;
  padding: 6px;
}

.editor-v2-wide-action {
  width: 100%;
  padding: 10px 13px;
  color: #fff;
  background: linear-gradient(135deg, #ff8a1f, #ffad3d);
  border: 0;
  box-shadow: 0 9px 22px rgba(255, 138, 31, 0.2);
}

.editor-v2-brand-row {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #ddd5e2;
  border-radius: 14px;
}

.editor-v2-brand-row > div {
  display: grid;
  gap: 2px;
}

.editor-v2-brand-row small,
.editor-v2-note {
  color: #7b7281;
  font-size: 12px;
  line-height: 1.4;
}

.editor-v2-brand-row button {
  color: #81410f;
  background: #fff0df;
  border: 1px solid #ffc98f;
}

.editor-v2-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.editor-v2-palette button {
  padding: 0;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px #cfc5d4;
}

.editor-brand-color-1 { background: #ff8a1f; }
.editor-brand-color-2 { background: #ffd166; }
.editor-brand-color-3 { background: #fff; }
.editor-brand-color-4 { background: #111; }
.editor-brand-color-5 { background: #23175b; }
.editor-brand-color-6 { background: #8b5cf6; }

@media (max-width: 380px) {
  .editor-v2-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-v2-toolbar > div {
    width: 100%;
  }

  .editor-v2-toolbar button {
    flex: 1;
    min-width: 0;
  }

  .editor-v2-suggestions button {
    min-height: 112px;
    padding: 5px;
  }

  .editor-v2-inline {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 760px) {
  .creator-day-materials .creator-result-card.is-editing {
    max-width: 820px;
    grid-column: 1 / -1;
  }

  .editor-v2-panel {
    padding-inline: 18px;
  }

  .editor-v2-template-grid,
  .editor-v2-fonts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
