/* ========== XECUTE — css/08-overrides-orientation.css ========== */
/* Fullscreen/save-badge/dark-mode overrides + orientation & landscape split */

/* ====== FULLSCREEN OVERRIDES ====== */
#editor-container:fullscreen {
  display: flex;
  flex-direction: column;
}
#preview-container:fullscreen {
  display: flex;
  flex-direction: column;
}
#editor-container:-webkit-full-screen { display: flex; flex-direction: column; }
#preview-container:-webkit-full-screen { display: flex; flex-direction: column; }

/* ====== SAVE STATUS BADGE ====== */
.save-status {
  position: fixed;
  top: calc(var(--header-h) + 8px);
  right: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.save-status.visible { opacity: 1; }

/* ====== DARK MODE COMPATIBILITY ====== */
/* Default is already dark; "light-mode" enables light theme */
body:not(.light-mode) .CodeMirror { border: 1px solid var(--border); }

/* ====== RESPONSIVE CONSTRAINTS ====== */
/* Prevent layout from breaking on very small viewports */
@media (max-width: 600px) {
  .footer-center { display: none; }
  footer button span { display: none; }
  .logo-text { display: none; }
}

/* ====== ORIENTATION PANEL ====== */
#orientPanel {
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
  animation: slideDown 0.15s ease;
}
.orient-label {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 4px;
}
.orient-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.12s;
}
.orient-btn:hover { border-color: var(--accent); color: var(--accent); }
.orient-btn.active {
  background: rgba(88,166,255,0.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.orient-close-btn {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orient-close-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ====== HORIZONTAL SPLIT (landscape) ====== */
#editor-preview-split.horizontal {
  flex-direction: row;
}
#editor-preview-split.horizontal #editor-container {
  height: 100% !important;
  width: 50%;
  min-width: 80px;
  min-height: unset;
  align-self: stretch;
}
#editor-preview-split.horizontal #resize-handle {
  width: 8px;
  height: auto;
  cursor: ew-resize;
  border-top: none;
  border-bottom: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  flex-direction: column;
}
#editor-preview-split.horizontal #resize-handle .resize-dots {
  flex-direction: column;
}
#editor-preview-split.horizontal #preview-container {
  flex: 1;
  min-width: 80px;
}
