/* Ambora Studio uses the same controls and canvas for editing and proofing.
   These surfaces belong to the free editor; proof and template views keep their layouts. */
.as-studio.aae-studio {
  --aae-plum: #302038;
  --aae-paper: #fffdf7;
  --aae-board: #f0ebdf;
  --aae-rule: #d9cfbe;
  --aae-violet: #6744cc;
  --aae-light: #f0eafb;
}

.aae-studio:not(.as-reviewing) .as-shell {
  background-color: var(--aae-paper);
  color: var(--aae-plum);
}

.as-studio.aae-studio:not(.as-reviewing) .as-topbar {
  color: #fff8ef;
  background: var(--aae-plum) !important;
  border-bottom: 1px solid #211425 !important;
  box-shadow: none;
}

.aae-studio:not(.as-reviewing) .as-topbar::before {
  display: none;
}

.as-studio.aae-studio:not(.as-reviewing) .as-topbar .as-brand {
  color: var(--aae-paper);
}

.as-studio.aae-studio:not(.as-reviewing) .as-topbar .as-brand span {
  color: #f2d8f5;
  background: transparent;
  padding: 0;
  font: 600 10px/1.15 ui-monospace, Consolas, monospace;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.as-studio.aae-studio:not(.as-reviewing) .as-topbar .as-project-title {
  border-color: #746376;
}

.as-studio.aae-studio:not(.as-reviewing) .as-topbar .as-project-title input {
  background: transparent;
  color: #fffdf7 !important;
}

.as-studio.aae-studio:not(.as-reviewing) .as-topbar .as-project-title input::placeholder {
  color: #e3d4e5;
  opacity: 1;
}

.aae-studio:not(.as-reviewing) .as-topbar :is(.as-save-state, .as-steps, .as-steps [aria-current]) {
  color: #e7d9e8;
}

.as-studio.aae-studio:not(.as-reviewing) .as-topbar .as-project-history {
  background: transparent;
  border-color: #675269;
}

.as-studio.aae-studio:not(.as-reviewing) .as-topbar :is(.asm-project-button, .as-project-history button, .as-close) {
  background: transparent !important;
  color: #fffaf3 !important;
}

.as-studio.aae-studio:not(.as-reviewing) .as-topbar :is(.as-save-top, .asd-project-button, .as-tour-launch, .as-fullscreen-button) {
  background: #46354d !important;
  border-color: #6d5872 !important;
  color: #fffaf3 !important;
}

.as-studio.aae-studio:not(.as-reviewing) .as-topbar button:focus-visible {
  outline: 2px solid #f4d6ff !important;
  outline-offset: 1px !important;
}

.as-studio.aae-studio:not(.as-reviewing) :is(.asm-review-top, .as-bottom .as-review) {
  border: 1px solid #8c6cdc !important;
  border-radius: 9px !important;
  background: var(--aae-violet) !important;
  box-shadow: none;
  color: white !important;
}

.as-studio.aae-studio:not(.as-reviewing) .as-workspace {
  background: #eae4d9;
}

.as-studio.aae-studio:not(.as-reviewing) .as-stage {
  background-color: var(--aae-board) !important;
  background-image: radial-gradient(circle, #c7bcaa 0.7px, transparent 1px) !important;
  background-size: 15px 15px !important;
  border-color: var(--aae-rule);
  border-radius: 10px;
}

.as-studio.aae-studio:not(.as-reviewing) :is(.as-panel, .as-workspace > .as-project-pane) {
  border-color: var(--aae-rule);
  background: var(--aae-paper);
}

.aae-studio:not(.as-reviewing) :is(.as-project-pane > header h3, .as-element-heading h3, .as-layers-pane h3, .asm-panel-head strong) {
  color: var(--aae-plum);
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: -.025em;
}

.as-studio.aae-studio:not(.as-reviewing) :is(.asm-panel-head, .as-editor-tabs, .as-bottom, .asm-dock) {
  background: var(--aae-paper) !important;
  border-color: var(--aae-rule) !important;
}

.aae-studio:not(.as-reviewing) .as-project-pane .as-add-tools > button {
  border-color: #dcd4c7;
  border-radius: 10px;
  color: var(--aae-plum);
}

.as-studio.aae-studio:not(.as-reviewing) .asm-dock-button {
  color: var(--aae-plum) !important;
  font-weight: 600;
}

.aae-studio:not(.as-reviewing) .asm-dock-button .asm-dock-icon {
  color: var(--aae-plum);
}

.as-studio.aae-studio:not(.as-reviewing) .asm-dock-button[data-active=true] .asm-dock-icon {
  background: var(--aae-light);
  color: var(--aae-violet);
}

.as-studio.aae-studio:not(.as-reviewing) .as-stage .as-zoom {
  color: var(--aae-plum);
}

.as-studio.aae-studio:not(.as-reviewing) .as-stage .as-zoom button {
  background: var(--aae-paper) !important;
  color: var(--aae-plum) !important;
  border-color: var(--aae-rule) !important;
}

.as-studio.aae-studio:not(.as-reviewing) .as-zoom button[aria-pressed=true] {
  background: var(--aae-light) !important;
  color: #563486 !important;
}

.as-studio.aae-studio:not(.as-reviewing) .as-zoom-value {
  color: #514252;
  font-variant-numeric: tabular-nums;
}

/* The core updates the layer-list empty state for undo, deletion, face changes,
   and project restoration. Reuse it even if no individual layer is selected. */
.aae-studio .aae-first {
  display: none;
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 9px 16px;
  margin: 0;
  padding: 14px clamp(12px, 2vw, 24px);
  box-sizing: border-box;
  color: var(--aae-plum);
  background: var(--aae-paper);
  border-bottom: 1px solid var(--aae-rule);
  border-radius: inherit;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

@media (min-height: 501px) {
  .aae-studio:has(.as-no-layers:not([hidden])):not(.as-reviewing, .as-drawer-open, .as-has-selection) .as-workspace:not([inert]) .aae-first {
    display: flex;
  }

  .as-studio.aae-studio:has(.as-no-layers:not([hidden])):not(.as-reviewing, .as-drawer-open, .as-has-selection) .as-workspace:not([inert]) .as-stage:has(> .aae-first) {
    padding-top: calc(var(--aae-first-height, 72px) + 10px) !important;
  }
}

.as-studio.aae-studio .aae-first h2 {
  flex: 1 1 145px;
  min-width: 0;
  margin: 0;
  color: var(--aae-plum);
  font: 500 clamp(22px, 2.2vw, 32px)/1.06 Georgia, 'Times New Roman', serif;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.aae-studio .aae-first-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.as-studio.aae-studio .aae-first-action {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--aae-paper);
  color: var(--aae-plum);
  border: 1px solid #9c8da6;
  border-radius: 8px;
  font: 600 13px/1.2 Arial, sans-serif;
  box-shadow: none;
}

.as-studio.aae-studio .aae-first-action:first-child {
  color: white;
  background: var(--aae-violet);
  border-color: var(--aae-violet);
}

.as-studio.aae-studio .aae-first-action svg {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  color: inherit;
  fill: none;
  stroke-width: 1.8;
}

.aae-studio .aae-first-privacy {
  display: none;
  flex-basis: 100%;
  margin: 0;
  color: #5c4e59;
  font: 400 12px/1.45 Arial, sans-serif;
}

/* The sidebar contains the insertion tools at this breakpoint. Keep both
   columns on smaller displays where those controls are housed in the panel. */
@media (min-width: 1120px) and (min-height: 551px) {
  @supports selector(&) {
    .aae-studio.as-three-spaces:not(.as-reviewing, .as-has-selection, .as-focus-view, .aae-tour-starting):not(:has(.as-tour[open]))
    .as-workspace:not([inert]):has(> .as-project-pane):has(> .as-panel[data-space="element"] .as-no-layers:not([hidden])):has(.aae-first):not(:has(> .as-panel :focus)):is(:not(:has(> .as-panel .as-guest-privacy)), :has(.aae-first-privacy:not(:empty))) {
      grid-template-columns: clamp(214px, 16vw, 246px) minmax(0, 1fr) !important;

      & > .as-panel {
        display: none !important;
      }

      &:has(> .as-panel .as-guest-privacy) .aae-first-privacy {
        display: block;
      }
    }
  }
}

@media (min-width: 761px) and (min-height: 551px), (min-width: 1101px) {
  .as-studio.aae-studio:not(.as-reviewing) .as-stage .as-zoom {
    align-self: center;
    justify-self: center;
    width: fit-content !important;
    max-width: 100% !important;
    min-height: 0;
    height: auto;
    gap: 2px;
    padding: 3px !important;
    background: var(--aae-paper) !important;
    border: 1px solid var(--aae-rule) !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 6px #3020380c;
  }

  .as-studio.aae-studio:not(.as-reviewing) .as-stage .as-zoom button {
    flex: none;
    min-width: 0;
    min-height: 36px;
    height: auto;
    width: auto;
    padding: 5px 7px !important;
    border: 0 !important;
    border-radius: 6px !important;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.2;
  }

  .as-studio.aae-studio:not(.as-reviewing) .as-stage .as-zoom :is([data-action="zoom-out"], [data-action="zoom-in"]) {
    width: 32px;
    font-size: 18px;
  }

  .as-studio.aae-studio:not(.as-reviewing) .as-stage .as-zoom output {
    flex: none;
    width: 40px;
  }

  .as-studio.aae-studio:not(.as-reviewing) .as-stage .as-zoom button[aria-pressed=true] {
    color: #4c3376 !important;
    background: var(--aae-light) !important;
  }
}

.as-studio.aae-studio .aae-first-action:focus-visible {
  outline: 2px solid #472a8b !important;
  outline-offset: 3px !important;
}

@media (hover: hover) {
  .as-studio.aae-studio .aae-first-action:hover {
    background: #f2eef8;
    color: var(--aae-plum);
    border-color: var(--aae-violet);
  }

  .as-studio.aae-studio .aae-first-action:first-child:hover {
    background: #5233a7;
    color: white;
  }
}

@media (max-width: 760px), (max-width: 1100px) and (max-height: 550px) and (orientation: landscape) {
  .as-studio.aae-studio:not(.as-reviewing) .as-stage {
    border-radius: 0;
  }

  .as-studio.aae-studio:not(.as-reviewing) .as-topbar .as-brand {
    font-size: 20px;
  }

  .as-studio.aae-studio:not(.as-reviewing) .asm-panel-head strong {
    font-size: 20px;
  }

  .as-studio.aae-studio .asm-dock {
    box-shadow: 0 -2px 14px #3020380c;
  }
}

@media (max-width: 480px) {
  .aae-studio .aae-first {
    gap: 8px;
    padding: 11px 14px;
  }

  .aae-studio .aae-first h2 {
    flex-basis: 100%;
  }
}
