/* --- EDITOR MODE STYLES --- */
body.editor-mode #landing-view {
  display: none !important;
}
body.editor-mode #editor-screen {
  display: grid; 
  height: auto;
  min-height: 100vh;
  overflow: visible;
  padding: 0;
  margin: 0;
  align-items: start;
}

/* Make the left side (Canvas) grow naturally */
body.editor-mode .editor-left {
  height: auto;
  overflow: visible;
  padding: 0;
  margin: 0;
  scroll-behavior: auto;
  align-self: start;
}

/* Make the right side (Settings) sticky — top matches canvas + panel header row */
body.editor-mode .editor-right {
  position: sticky;
  top: var(--editor-content-offset);
  max-height: calc(100vh - var(--editor-content-offset) - 12px);
  overflow-y: auto;
  padding: 0 4px 0 0;
  height: fit-content;
  align-self: start;
  gap: var(--spacing-md);
}

body.editor-mode .site-footer {
  position: relative;
  border-top: 1px solid var(--footer-border);
  background: linear-gradient(180deg, var(--footer-bg-top) 0%, var(--footer-bg) 100%);
  padding: 24px 0;
  margin-top: 0;
  width: 100%;
}

/* --- HISTORY MODAL STYLES --- */
.history-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  background: var(--bg-elevated);
  position: relative;
  transform: translateZ(0);
  will-change: transform;
}
.history-item:hover {
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: var(--border-strong);
}
.history-item .history-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-base);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.15s ease;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.history-item:hover .history-delete-btn {
  opacity: 1;
  transform: scale(1);
}
.history-item .history-delete-btn:hover {
  background: var(--danger-subtle);
  border-color: var(--danger-subtle);
}
.history-item .history-delete-btn:hover svg {
  color: var(--danger-dark);
}
.history-item .history-delete-btn svg {
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
  transition: color 0.15s ease;
}
.history-thumb {
  height: 120px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform: translateZ(0);
}
.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(0);
}
.history-meta {
  padding: 12px;
}
.history-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-date {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
}
