/**
 * PAGES STYLE — REAL-TIME WORKSPACE & MODULAR SECTION EDITOR STYLES
 * High-contrast editorial monochrome design system, Tajawal typography,
 * isolated starfield canvas, two-tier nested repeaters, and visual inspector.
 */

:root {
  --sidebar-w: 420px;
  --topbar-h: 48px;
  --color-border: #E4E4E7;
  --color-border-dark: #27272A;
  --color-accent: #000000;
  --color-accent-hover: #27272A;
  --color-bg-light: #FAFAFA;
  --color-bg-sidebar: #FFFFFF;
  --color-bg-header: #09090B;
  --color-text: #09090B;
  --color-text-muted: #71717A;
  --color-input-border: #D4D4D8;
}

/* ==========================================================================
   BODY & BASE SCOPING (EDGE CASE 1: STARFIELD ISOLATION)
   ========================================================================== */

body.editor-mode {
  margin: 0;
  padding: 0;
  background-color: #000000;
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--color-text);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* CRITICAL FIX: Reset global starfield from style.css so it does NOT bleed behind editor topbar & sidebar */
body.editor-mode::before {
  display: none !important;
}

/* ==========================================================================
   TOP APPLICATION BAR
   ========================================================================== */

.editor-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: var(--color-bg-header);
  border-bottom: 1px solid var(--color-border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  box-sizing: border-box;
  color: #FFFFFF;
}

.editor-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-back-link {
  color: #A1A1AA;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.15s ease;
}

.editor-back-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.editor-title-badge {
  font-family: 'Shrikhand', serif;
  font-style: italic;
  font-size: 0.90rem;
  font-weight: 400;
  color: #FFFFFF;
  padding-left: 12px;
  border-left: 1px solid var(--color-border-dark);
  letter-spacing: 0.12em;
}

.editor-save-status {
  font-size: 0.72rem;
  color: #A1A1AA;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.editor-save-status .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #22C55E;
  display: inline-block;
  box-shadow: 0 0 6px #22C55E;
}

.editor-topbar-center {
  display: flex;
  align-items: center;
  background: #18181B;
  border: 1px solid var(--color-border-dark);
  border-radius: 4px;
  padding: 3px;
  gap: 2px;
}

.editor-page-tab {
  background: transparent;
  border: none;
  color: #A1A1AA;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.15s ease;
}

.editor-page-tab:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.editor-page-tab.active {
  background: #FFFFFF;
  color: #000000;
}

.editor-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-bar-btn {
  background: #18181B;
  border: 1px solid var(--color-border-dark);
  color: #D4D4D8;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.15s ease;
}

.editor-bar-btn:hover:not(:disabled) {
  background: #27272A;
  color: #FFFFFF;
  border-color: #52525B;
}

.editor-bar-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.editor-bar-btn.active {
  background: #27272A;
  color: #FFFFFF;
  border-color: #71717A;
}

.editor-btn-export {
  background: #FFFFFF !important;
  color: #000000 !important;
  border-color: #FFFFFF !important;
  font-weight: 800;
}

.editor-btn-export:hover {
  background: #E4E4E7 !important;
  color: #000000 !important;
}

.editor-btn-svg {
  flex-shrink: 0;
}

/* ==========================================================================
   MAIN WORKSPACE SPLIT (SIDEBAR + PREVIEW)
   ========================================================================== */

.editor-workspace {
  display: flex;
  position: absolute;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

/* ==========================================================================
   LEFT SIDEBAR INSPECTOR
   ========================================================================== */

.editor-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--color-bg-sidebar);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  z-index: 200;
  overflow: hidden;
}

.sidebar-tab-switcher {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  background: #F4F4F5;
  padding: 4px 8px;
  gap: 4px;
}

.sidebar-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  color: #71717A;
  padding: 6px 8px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.15s ease;
}

.sidebar-tab-btn:hover {
  color: #000000;
  background: rgba(0, 0, 0, 0.04);
}

.sidebar-tab-btn.active {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.editor-sidebar-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  background: #FAFAFA;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.active-section-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.active-section-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: #52525B;
  background: #E4E4E7;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-action-btns-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.editor-btn-action-sm {
  background: #FFFFFF;
  border: 1px solid var(--color-input-border);
  color: #18181B;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: all 0.15s ease;
}

.editor-btn-action-sm:hover:not(:disabled) {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
}

.editor-btn-action-sm:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.editor-btn-remove-sec:hover:not(:disabled) {
  background: #DC2626 !important;
  color: #FFFFFF !important;
  border-color: #DC2626 !important;
}

.editor-btn-add-sec {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
  font-weight: 800;
}

.editor-btn-add-sec:hover {
  background: #27272A;
  color: #FFFFFF;
}

.section-title-heading {
  margin: 0;
  font-family: 'Shrikhand', serif;
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 400;
  color: #000000;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-sidebar-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-view-modes {
  display: flex;
  background: #E4E4E7;
  border-radius: 3px;
  padding: 2px;
  gap: 2px;
}

.editor-mode-btn {
  background: transparent;
  border: none;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: #52525B;
  padding: 2px 8px;
  border-radius: 2px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.15s ease;
}

.editor-mode-btn.active {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.editor-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  box-sizing: border-box;
}

/* ==========================================================================
   INSPECTOR FORM CONTROLS & REPEATERS
   ========================================================================== */

.editor-form-group {
  margin-bottom: 12px;
}

.editor-form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #52525B;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.editor-input,
.editor-textarea,
.editor-select {
  width: 100%;
  box-sizing: border-box;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.84rem;
  color: #09090B;
  background: #FFFFFF;
  border: 1px solid var(--color-input-border);
  border-radius: 2px;
  padding: 6px 9px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.editor-input:focus,
.editor-textarea:focus,
.editor-select:focus {
  border-color: #000000;
  box-shadow: 0 0 0 1px #000000;
}

.editor-textarea {
  min-height: 60px;
  resize: vertical;
  line-height: 1.4;
}

.editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.editor-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.editor-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.editor-toggle-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #18181B;
  letter-spacing: 0.02em;
}

/* Switch styling */
.editor-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.editor-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.editor-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #D4D4D8;
  transition: 0.2s;
  border-radius: 20px;
}

.editor-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.editor-switch input:checked + .editor-slider {
  background-color: #000000;
}

.editor-switch input:checked + .editor-slider:before {
  transform: translateX(16px);
}

/* Card / Group Containers in Sidebar */
.editor-repeater-card {
  background: #F8FAFC;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 10px;
  margin-bottom: 10px;
}

.editor-repeater-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--color-border);
}

.editor-repeater-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #000000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.editor-repeater-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.editor-btn-icon {
  background: #FFFFFF;
  border: 1px solid var(--color-input-border);
  color: #18181B;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.68rem;
  padding: 2px 5px;
  border-radius: 2px;
  cursor: pointer;
}

.editor-btn-icon:hover {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
}

.editor-btn-icon.btn-delete:hover {
  background: #DC2626 !important;
  color: #FFFFFF !important;
  border-color: #DC2626 !important;
}

.editor-btn-add {
  width: 100%;
  background: #FFFFFF;
  border: 1px dashed #A1A1AA;
  color: #18181B;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px;
  border-radius: 2px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.15s ease;
  margin-top: 4px;
}

.editor-btn-add:hover {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
  border-style: solid;
}

/* Raw JSON Panel */
.editor-raw-panel {
  display: none;
  flex-direction: column;
  height: 100%;
}

.editor-raw-error {
  display: none;
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #F87171;
  padding: 6px 10px;
  font-size: 0.72rem;
  border-radius: 2px;
  margin-bottom: 8px;
}

.editor-raw-error.show {
  display: block;
}

.editor-raw-textarea {
  width: 100%;
  height: 480px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #18181B;
  background: #F4F4F5;
  border: 1px solid var(--color-input-border);
  border-radius: 2px;
  padding: 10px;
  box-sizing: border-box;
  resize: vertical;
}

.editor-raw-textarea:focus {
  outline: none;
  border-color: #000000;
  background: #FFFFFF;
}

/* Page Structure Outline Tree */
.outline-section-block {
  margin-bottom: 12px;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  background: #FAFAFA;
  overflow: hidden;
}

.outline-section-header {
  padding: 8px 10px;
  background: #F4F4F5;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 800;
  color: #000000;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.outline-items-list {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.outline-item-row {
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 2px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.12s ease;
}

.outline-item-row:hover {
  border-color: #000000;
}

.outline-item-row.active {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
}

.outline-item-row.active .outline-item-label {
  color: #FFFFFF;
}

.outline-item-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #18181B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* ==========================================================================
   RIGHT LIVE PREVIEW CANVAS (EDGE CASE 1: ISOLATED STARFIELD)
   ========================================================================== */

.editor-preview-canvas {
  flex: 1;
  position: relative;
  background-color: #000000;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem 1.5rem 3rem;
  box-sizing: border-box;
}

/* Starfield scoped specifically to the preview canvas */
.editor-preview-canvas::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image: url('assets/stars-bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: repeat-y;
}

.editor-preview-canvas .site-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
}

/* ==========================================================================
   CANVAS INTERACTIVE WIDGET WRAPPERS & OUTLINES
   ========================================================================== */

.editor-widget-wrapper {
  position: relative;
  transition: outline 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.show-outlines .editor-widget-wrapper {
  outline: 1px dashed rgba(0, 0, 0, 0.18);
  outline-offset: 4px;
}

.editor-widget-wrapper:hover {
  outline: 1px solid #000000 !important;
  outline-offset: 4px;
}

.editor-widget-wrapper.active-editing {
  outline: 2px solid #000000 !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
}

/* Floating element toolbar on hover/focus */
.editor-widget-toolbar {
  position: absolute;
  top: -28px;
  right: 0;
  background: #000000;
  border-radius: 2px;
  padding: 2px 4px;
  display: none;
  align-items: center;
  gap: 3px;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.editor-widget-wrapper:hover > .editor-widget-toolbar,
.editor-widget-wrapper.active-editing > .editor-widget-toolbar {
  display: flex;
}

.editor-tool-btn {
  background: transparent;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 2px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: background 0.1s ease;
}

.editor-tool-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.editor-tool-btn.btn-tool-del:hover {
  background: #DC2626 !important;
}

.editor-col-add-btn {
  width: 100%;
  padding: 10px;
  margin-top: 1.5rem;
  background: transparent;
  border: 1.5px dashed #000000;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #000000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}

.editor-col-add-btn:hover {
  background: #000000;
  color: #FFFFFF;
  border-style: solid;
}

/* ==========================================================================
   MODAL OVERLAYS
   ========================================================================== */

.editor-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(2px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.editor-modal-backdrop.open {
  display: flex;
}

.editor-modal-card {
  background: #FFFFFF;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  border: 1px solid #000000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.editor-modal-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000000;
  color: #FFFFFF;
}

.editor-modal-title {
  margin: 0;
  font-family: 'Shrikhand', serif;
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.editor-modal-close-btn {
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.editor-modal-close-btn:hover {
  color: #A1A1AA;
}

.editor-modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.editor-modal-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--color-border);
  background: #F4F4F5;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Export Code Modal */
.export-note {
  font-size: 0.82rem;
  color: #52525B;
  margin-bottom: 10px;
  line-height: 1.4;
}

.export-note code {
  background: #E4E4E7;
  padding: 2px 4px;
  border-radius: 2px;
  font-weight: 700;
}

.export-code-container {
  border: 1px solid var(--color-input-border);
  border-radius: 3px;
  background: #09090B;
  overflow: hidden;
}

.export-code-header {
  background: #18181B;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #27272A;
}

.export-code-title {
  font-family: 'Consolas', monospace;
  font-size: 0.72rem;
  color: #A1A1AA;
  font-weight: 600;
}

.export-code-block {
  margin: 0;
  padding: 12px;
  font-family: 'Consolas', monospace;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #F4F4F5;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Reset Modal Box */
.reset-confirm-box {
  text-align: center;
  padding: 12px 0;
}

.reset-confirm-box h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 800;
}

.reset-confirm-box p {
  margin: 0;
  font-size: 0.82rem;
  color: #71717A;
}

/* Tutorial Steps */
.tutorial-step-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tutorial-step-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  background: #F4F4F5;
  border-radius: 3px;
  border-left: 3px solid #000000;
}

.tutorial-step-icon {
  background: #000000;
  color: #FFFFFF;
  width: 28px;
  height: 28px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tutorial-step-content h4 {
  margin: 0 0 2px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #000000;
  letter-spacing: 0.02em;
}

.tutorial-step-content p {
  margin: 0;
  font-size: 0.76rem;
  color: #52525B;
  line-height: 1.35;
}

/* Section Picker List */
.section-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #F4F4F5;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  transition: border-color 0.12s ease;
}

.section-picker-item:hover {
  border-color: #000000;
}

.section-picker-info h4 {
  margin: 0 0 2px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #000000;
}

.section-picker-info p {
  margin: 0;
  font-size: 0.72rem;
  color: #71717A;
}

.section-picker-add-btn {
  background: #000000;
  color: #FFFFFF;
  border: none;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 2px;
  cursor: pointer;
  text-transform: uppercase;
}

.section-picker-add-btn:hover {
  background: #27272A;
}

/* ==========================================================================
   TOAST POPUP
   ========================================================================== */

.toast-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #000000;
  color: #FFFFFF;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 3000;
}

.toast-popup.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   PAGE VISIBILITY & CHANNEL REMOVAL STYLES
   ========================================================================== */

/* Topbar Page Tab Disabled Indicator */
.editor-page-tab.page-disabled {
  opacity: 0.55;
  color: #A1A1AA;
}

.editor-page-tab.page-disabled::after {
  content: ' (off)';
  font-size: 0.65rem;
  color: #EF4444;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Inspector Page Status Card */
.editor-page-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F4F4F5;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.editor-page-status-card.status-disabled {
  background: #FFFBEB;
  border-color: #FDE68A;
}

.editor-page-status-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.editor-page-status-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #18181B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.editor-page-status-desc {
  font-size: 0.70rem;
  color: #71717A;
}

.editor-page-status-card.status-disabled .editor-page-status-desc {
  color: #B45309;
  font-weight: 700;
}

.editor-page-status-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-page-on {
  background: #ECFDF5 !important;
  color: #047857 !important;
  border-color: #A7F3D0 !important;
  font-weight: 800 !important;
}

.btn-page-off {
  background: #FEF2F2 !important;
  color: #DC2626 !important;
  border-color: #FECACA !important;
  font-weight: 800 !important;
}

/* Outline Page Section Header Toggles */
.outline-section-block.page-disabled {
  opacity: 0.7;
  border-left: 3px solid #EF4444;
}

.outline-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #E4E4E7;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.outline-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.outline-page-toggle-btn {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 2px;
  cursor: pointer;
  text-transform: uppercase;
  border: 1px solid var(--color-input-border);
}

/* Disabled Page Banner on Canvas */
.editor-disabled-page-banner {
  background: #FFFBEB;
  border: 1px dashed #F59E0B;
  color: #92400E;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 8px 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 3px;
  box-sizing: border-box;
}

/* Channel Removed Box & Badges */
.channel-removed-box {
  padding: 12px;
  background: #FFFBEB;
  border: 1px dashed #FCD34D;
  border-radius: 3px;
  margin-top: 8px;
  text-align: center;
}

.channel-removed-box p {
  margin: 0 0 8px 0;
  font-size: 0.74rem;
  color: #92400E;
  font-weight: 600;
}

.editor-repeater-card.channel-removed {
  background: #FAFAFA;
  border-color: #E4E4E7;
  opacity: 0.85;
}

.channel-status-badge {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 6px;
}

.channel-status-badge.badge-active {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #BBF7D0;
}

.channel-status-badge.badge-removed {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

