.admin-section-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.82fr);
  align-items: start;
  gap: 24px;
}

.admin-section-workspace-editor {
  min-width: 0;
}

.admin-live-preview-panel {
  position: sticky;
  top: 24px;
  z-index: 4;
  min-width: 0;
  overflow: hidden;
  background: #edf3f6;
  border: 1px solid #ccdae0;
  border-radius: 17px;
  box-shadow: 0 24px 60px rgba(4,54,80,.12);
}

.admin-live-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  color: #fff;
  background: #043650;
}

.admin-live-preview-header strong {
  display: block;
  color: #fff;
  font: 500 .9rem "Barlow", sans-serif;
}

.admin-live-preview-eyebrow {
  margin: 0 0 3px;
  color: #72c8e9;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.admin-live-preview-collapse {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #fff;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 9px;
  cursor: pointer;
}

.admin-live-preview-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  background: #fff;
  border-bottom: 1px solid #d5e0e5;
}

.admin-live-preview-viewports {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: #edf3f6;
  border-radius: 999px;
}

.admin-live-preview-viewport,
.admin-live-preview-refresh {
  padding: 7px 11px;
  color: #5f7784;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: 600 .68rem "Work Sans", sans-serif;
}

.admin-live-preview-viewport.is-active {
  color: #043650;
  background: #fff;
  box-shadow: 0 3px 10px rgba(4,54,80,.1);
}

.admin-live-preview-refresh {
  color: #0066a1;
}

.admin-live-preview-stage {
  display: flex;
  justify-content: center;
  min-height: 660px;
  padding: 16px;
  overflow: auto;
}

.admin-live-preview-browser {
  width: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid #c9d6dc;
  border-radius: 12px;
  box-shadow: 0 15px 34px rgba(4,54,80,.11);
  transition: width 180ms ease;
}

.admin-live-preview-panel[data-viewport="tablet"]
  .admin-live-preview-browser {
  width: min(100%, 760px);
}

.admin-live-preview-panel[data-viewport="mobile"]
  .admin-live-preview-browser {
  width: min(100%, 390px);
}

.admin-live-preview-browser-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  background: #edf2f4;
  border-bottom: 1px solid #d5e0e5;
}

.admin-live-preview-browser-bar span {
  width: 7px;
  height: 7px;
  background: #b5c4cb;
  border-radius: 50%;
}

.admin-live-preview-frame {
  display: block;
  width: 100%;
  min-height: 630px;
  background: #fff;
  border: 0;
}

.admin-live-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  padding: 11px 14px;
  background: #fff;
  border-top: 1px solid #d5e0e5;
  font-size: .69rem;
}

.admin-live-preview-footer a {
  color: #0066a1;
  font-weight: 600;
}

.admin-live-preview-status::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  background: #94a8b2;
  border-radius: 50%;
  content: "";
}

.admin-live-preview-status.is-working::before {
  background: #f28d01;
}

.admin-live-preview-status.is-saved::before {
  background: #39a96b;
}

.admin-live-preview-status.is-warning::before {
  background: #d89a24;
}

.admin-live-preview-status.is-error::before {
  background: #c74646;
}

.admin-live-preview-panel.is-collapsed {
  display: none;
}

.admin-live-preview-document {
  min-height: 100vh;
  margin: 0;
  background: #fff;
}

/* The preview document intentionally does not boot the public Stimulus
   controller. Reveal elements must therefore render in their final state. */
.admin-live-preview-document .como-reveal,
.admin-live-preview-document [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
}

.admin-live-preview-empty {
  display: grid;
  place-items: center;
  min-height: 540px;
  padding: 40px;
  color: #718791;
  text-align: center;
}

.admin-live-preview-empty strong {
  color: #173f55;
  font: 500 1.25rem "Barlow", sans-serif;
}

.admin-live-preview-empty p {
  margin: 7px 0 0;
}

@media screen and (max-width: 1380px) {
  .admin-section-workspace {
    grid-template-columns: 1fr;
  }

  .admin-live-preview-panel {
    position: relative;
    top: auto;
  }
}

@media screen and (max-width: 680px) {
  .admin-live-preview-controls,
  .admin-live-preview-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-live-preview-stage {
    min-height: 520px;
    padding: 10px;
  }

  .admin-live-preview-frame {
    min-height: 500px;
  }
}
