/* BEF Site Builder - Premium Dashboard Styles */

:root {
  --bg-primary: #0a0b10;
  --bg-secondary: rgba(18, 20, 30, 0.75);
  --bg-tertiary: #161925;
  --accent-cyan: #00f0ff;
  --accent-purple: #7000ff;
  --accent-purple-hover: #5900cc;
  --accent-success: #10b981;
  --accent-success-hover: #059669;
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --text-muted: #718096;
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}

/* App Container Layout */
#app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Glassmorphism Header */
header {
  height: 64px;
  background: var(--bg-secondary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 100;
  box-shadow: var(--glass-shadow);
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-section img {
  height: 32px;
}

.logo-section h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-section span {
  font-size: 10px;
  text-transform: uppercase;
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  font-weight: 600;
}

/* Header Controls */
.controls-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
  justify-content: flex-start;
  max-width: 1150px;
  margin: 0 20px;
}

.control-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px 2px 2px 8px;
  height: 36px;
  box-sizing: border-box;
}

.import-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 12px;
  width: 110px;
  outline: none;
  height: 100%;
  padding: 0;
}

.import-input::placeholder {
  color: var(--text-muted);
}

.control-group .btn-primary {
  height: 100%;
  padding: 0 14px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple) 0%, #9033ff 100%);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(112, 0, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(112, 0, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.template-select {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

/* Device Switcher */
.device-switcher {
  display: flex;
  gap: 4px;
}

.device-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.device-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.device-btn.active {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
}

/* Pages Switcher Styles */
.pages-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 8px;
}

.pages-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pages-select {
  background: #0f121d;
  color: #fff;
  border: 1px solid var(--border-color);
  padding: 6px 20px 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 16px;
  min-width: 105px;
}

.page-action-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.page-action-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.page-action-btn.add-btn {
  color: var(--accent-cyan);
  border-color: rgba(0, 240, 255, 0.25);
  background: rgba(0, 240, 255, 0.05);
}

.page-action-btn.add-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  color: #fff;
}

.page-action-btn.delete-btn {
  color: #ff5252;
  border-color: rgba(255, 82, 82, 0.25);
  background: rgba(255, 82, 82, 0.05);
}

.page-action-btn.delete-btn:hover {
  background: rgba(255, 82, 82, 0.2);
  color: #fff;
}

/* Right Section Buttons */
.action-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-success) 0%, #059669 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* Workspace Panels */
#workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Left Sidebar (Blocks & Drag/Drop Elements) */
#left-panel {
  width: 280px;
  min-width: 180px;
  max-width: 500px;
  background: var(--bg-secondary);
  backdrop-filter: blur(8px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 90;
  transition: none;
  flex-shrink: 0 !important;
}

/* Panel Resize Handles */
.panel-resize-handle {
  width: 10px;
  height: 100% !important;
  margin: 0 -5px;
  cursor: col-resize;
  background: transparent;
  position: relative;
  z-index: 1000 !important;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.panel-resize-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 40px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
  opacity: 0;
}

.panel-resize-handle:hover {
  background: rgba(0, 240, 255, 0.08);
}

.panel-resize-handle:hover::after {
  opacity: 1;
  background: rgba(0, 240, 255, 0.4);
  height: 60px;
}

.panel-resize-handle:active {
  background: rgba(0, 240, 255, 0.15);
}

.panel-resize-handle:active::after {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

/* Prevent selection during resize */
body.resizing {
  cursor: col-resize !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

body.resizing iframe,
body.resizing .gjs-cv-canvas,
body.resizing .gjs-frame-wrapper {
  pointer-events: none !important;
}

.panel-header {
  padding: 18px 20px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* GrapesJS Block Manager Customizing */
#blocks-container {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

/* Customizing grapesjs blocks appearance to look dark & modern */
.gjs-block {
  width: 100% !important;
  min-height: 80px !important;
  background-color: rgba(255, 255, 255, 0.02) !important;
  border: 1px dashed rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  color: var(--text-secondary) !important;
  margin-bottom: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 15px !important;
  transition: all 0.2s ease !important;
  cursor: grab !important;
}

.gjs-block:hover {
  border-color: var(--accent-cyan) !important;
  color: var(--text-primary) !important;
  background-color: rgba(0, 240, 255, 0.03) !important;
  transform: translateY(-1px);
}

.gjs-block-label {
  font-size: 12px !important;
  font-weight: 500 !important;
  margin-top: 8px !important;
}

.gjs-block svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Canvas Area */
#canvas-container {
  flex: 1;
  background-color: #0b0c13;
  position: relative;
  z-index: 1; /* Force local stacking context to prevent GrapesJS layers from overlaying resize handles */
}

#gjs {
  height: 100%;
  position: relative !important;
}

/* Right Panel (Style Manager, Traits & Layers) */
#right-panel {
  width: 315px;
  min-width: 200px;
  max-width: 500px;
  background: var(--bg-secondary);
  backdrop-filter: blur(8px);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 90;
  transition: none;
  flex-shrink: 0 !important;
}

#styles-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  overflow-x: hidden;
}

#traits-container, #layers-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}

/* Override GrapesJS Default Panels */
#left-panel, #right-panel {
  background: #0c0d12 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

.gjs-sm-sectors, .gjs-blocks-c, .gjs-trt-traits, .gjs-layers-c {
  background-color: transparent !important;
}

/* Hide ALL duplicate Selector Manager instances */
/* 1. Hide any nested inside style manager sectors */
.gjs-sm-sectors .gjs-clm-c {
  display: none !important;
}

/* 2. Hide ALL .gjs-clm-c in the styles container by default */
#styles-container .gjs-clm-c {
  display: none !important;
}

/* 3. Show ONLY the first direct child .gjs-clm-c (the one from selectorManager.appendTo) */
#styles-container > .gjs-clm-c:first-of-type {
  display: block !important;
}

/* 4. Extra safety: hide any .gjs-clm-c that comes after .gjs-sm-sectors */
#styles-container > .gjs-sm-sectors ~ .gjs-clm-c {
  display: none !important;
}

/* Style GrapesJS Panels Container as a Premium Top Toolbar */
.gjs-pn-panels {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 48px !important;
  background: #0c0d12 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  padding: 0 0px 0 16px !important;
  z-index: 100 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
  box-sizing: border-box !important;
}

.gjs-pn-commands {
  display: none !important;
}

/* Reset individual GrapesJS floating panels */
.gjs-pn-options, 
.gjs-pn-views {
  position: static !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 100% !important;
}

/* Push the views switcher (Style, Settings, Layers, Blocks) to the far right */
.gjs-pn-views {
  margin-left: auto !important;
  margin-right: 0 !important;
  padding-right: 0 !important;
}

/* Ensure any sibling elements rendered after the views panel by GrapesJS are hidden */
.gjs-pn-views ~ * {
  display: none !important;
}

/* Give the last button some breathing room from the right edge */
.gjs-pn-views .gjs-pn-btn:last-child {
  margin-right: 12px !important;
}

/* Options panel is now the leftmost panel, so we remove the left margin and separator border */
.gjs-pn-options {
  margin-left: 0 !important;
  border-left: none !important;
  padding-left: 0 !important;
}

.gjs-pn-btn {
  color: var(--text-secondary) !important;
  background-color: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  padding: 6px !important;
  margin: 0 !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
}

.gjs-pn-btn:hover {
  color: var(--text-primary) !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-1px) !important;
}

.gjs-pn-btn.gjs-pn-active {
  color: var(--accent-cyan) !important;
  background-color: rgba(0, 240, 255, 0.1) !important;
  border-color: rgba(0, 240, 255, 0.3) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15) !important;
}

/* Hide the useless empty selection tool button (select-components) in top commands panel */
#gjs-pn-select-components,
.gjs-pn-select-components,
.gjs-pn-btn[data-id="select-components"],
.gjs-pn-btn[id*="select-components"] {
  display: none !important;
}

/* Hide Redundant GrapesJS Device Switchers */
.gjs-pn-devices-c, 
.gjs-devices-c,
.gjs-pn-devices {
  display: none !important;
}

.gjs-pn-views-container {
  display: none !important;
}

/* Right Panel Styles (Style Manager, Traits, Layers) */
.gjs-sm-sector {
  border-bottom: 1px solid var(--border-color) !important;
  background-color: transparent !important;
  transition: border-left 0.2s ease !important;
  border-left: 3px solid transparent !important;
}

.gjs-sm-sector.gjs-sm-open {
  border-left: 3px solid var(--accent-purple) !important;
  background-color: rgba(255, 255, 255, 0.01) !important;
}

.gjs-sm-title {
  color: var(--text-primary) !important;
  font-weight: 600 !important;
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  padding: 12px 14px !important;
  background-color: transparent !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-width: 0 !important;
}

/* Inner text of sector title must also truncate */
.gjs-sm-title > span,
.gjs-sm-title > div:not(.gjs-sm-title-caret):not([class*="caret"]) {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.gjs-sm-title:hover {
  background-color: rgba(255, 255, 255, 0.02) !important;
  color: var(--accent-cyan) !important;
}

/* Sector title caret icon (collapse/expand arrow) */
.gjs-sm-title i,
.gjs-sm-title .gjs-caret-icon,
.gjs-sm-title [class*="caret"] {
  flex-shrink: 0 !important;
  margin-left: 6px !important;
}


.gjs-sm-properties {
  background-color: transparent !important;
  padding: 10px 12px !important;
}

.gjs-sm-property {
  color: var(--text-secondary) !important;
  margin-bottom: 10px !important;
  overflow: hidden !important;
}

.gjs-sm-property .gjs-sm-label {
  font-size: 11px !important;
  font-weight: 500 !important;
  text-transform: capitalize !important;
  color: var(--text-secondary) !important;
  margin-bottom: 4px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Composite property fields (margin, padding with 4 sub-inputs) */
.gjs-sm-composite {
  overflow: hidden !important;
}

.gjs-sm-composite .gjs-sm-properties {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 8px !important;
}

.gjs-sm-composite .gjs-sm-property {
  flex: 1 1 calc(50% - 6px) !important;
  min-width: 0 !important;
  margin-bottom: 4px !important;
}

.gjs-sm-composite .gjs-field {
  min-width: 0 !important;
}

/* GrapesJS Field Arrows (up/down) */
.gjs-field-arrows {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  color: var(--text-muted) !important;
  padding: 0 2px !important;
}

.gjs-field-arrow-u,
.gjs-field-arrow-d {
  font-size: 6px !important;
  line-height: 1 !important;
  color: var(--text-muted) !important;
  transition: color 0.15s ease !important;
}

.gjs-field-arrow-u:hover,
.gjs-field-arrow-d:hover {
  color: var(--accent-cyan) !important;
}

/* Form inputs & inputs with values overrides */
.gjs-field {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background-color: #0f121d !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: 6px !important;
  padding: 4px 6px !important;
  font-family: inherit !important;
  font-size: 12px !important;
  height: 30px !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
  overflow: hidden !important;
}

.gjs-field:focus-within, .gjs-field:focus {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.2) !important;
}

.gjs-field input {
  background: transparent !important;
  border: none !important;
  color: var(--text-primary) !important;
  font-family: inherit !important;
  width: 100% !important;
  height: 100% !important;
  outline: none !important;
  padding: 0 !important;
}

/* Overrides for text inputs inside fields that host color picker or unit selector */
.gjs-field-color input {
  padding-right: 38px !important;
}

.gjs-field-integer input {
  padding-right: 32px !important;
}

/* Ensure select field wrappers do not have inner padding so selects can stretch to fill */
.gjs-field.gjs-select {
  padding: 0 !important;
}

/* Unit selectors inside GrapesJS fields */
.gjs-field-unit {
  background: transparent !important;
  border: none !important;
  color: var(--accent-cyan) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  outline: none !important;
  padding-right: 12px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml;utf8,<svg fill='rgb(0,240,255)' height='12' viewBox='0 0 24 24' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right center !important;
  background-size: 10px !important;
}

/* Color Picker Container */
.gjs-field-colorp {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  height: 100% !important;
  width: 32px !important;
  padding: 0 !important;
  border-left: 1px solid var(--border-color) !important;
  border-top: none !important;
  border-bottom: none !important;
  border-right: none !important;
  box-sizing: border-box !important;
  z-index: 10 !important;
  overflow: hidden !important;
  border-radius: 0 5px 5px 0 !important;
}

.gjs-field-colorp-c,
.gjs-field-colorp .gjs-checker-bg {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
}

.gjs-field-color-picker {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.gjs-field-color-color {
  border-radius: 0 !important;
}

/* Hide default GrapesJS built-in arrow elements to prevent double chevrons */
.gjs-field .gjs-d-s-arrow,
.gjs-field .gjs-sel-arrow {
  display: none !important;
}

/* Select inputs inside style manager and trait manager */
.gjs-field select:not(.gjs-field-unit),
.gjs-sm-property select:not(.gjs-field-unit),
.gjs-trt-trait select:not(.gjs-field-unit) {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 16px !important;
  padding-right: 24px !important;
  padding-left: 8px !important;
  background-color: transparent !important;
  border: none !important;
  color: var(--text-primary) !important;
  border-radius: 0 !important;
  height: 100% !important;
  width: 100% !important;
  outline: none !important;
  cursor: pointer !important;
  font-family: inherit !important;
  box-shadow: none !important;
  margin: 0 !important;
}

/* Standalone select inputs that are not wrapped in .gjs-field */
.gjs-sm-property > select,
.gjs-trt-trait > select {
  background-color: #0f121d !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  height: 30px !important;
  padding-left: 8px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 16px !important;
  padding-right: 24px !important;
  outline: none !important;
  cursor: pointer !important;
  font-family: inherit !important;
}

.gjs-sm-property > select:focus,
.gjs-trt-trait > select:focus {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.2) !important;
}

.gjs-field select:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* GrapesJS button groups (text alignment, font style, etc.) */
.gjs-sm-btn-group {
  display: flex !important;
  width: 100% !important;
  background-color: #0f121d !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  padding: 2px !important;
  overflow: hidden !important;
  gap: 2px !important;
}

.gjs-sm-btn-group .gjs-sm-btn {
  flex: 1 !important;
  border: none !important;
  border-radius: 4px !important;
  background-color: transparent !important;
  color: var(--text-secondary) !important;
  padding: 6px 0 !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
}

.gjs-sm-btn-group .gjs-sm-btn:hover {
  color: var(--text-primary) !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
}

.gjs-sm-btn-group .gjs-sm-btn.gjs-sm-btn-active,
.gjs-sm-btn-group .gjs-sm-btn.gjs-sm-active,
.gjs-sm-btn-group .gjs-sm-btn.gjs-active {
  background: linear-gradient(135deg, var(--accent-purple) 0%, #8824ff 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(112, 0, 255, 0.2) !important;
}

/* Traits Manager Inputs */
.gjs-trt-traits {
  padding: 15px !important;
}

.gjs-trt-trait {
  color: var(--text-secondary) !important;
  margin-bottom: 12px !important;
}

.gjs-trt-trait .gjs-label {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: var(--text-secondary) !important;
  margin-bottom: 4px !important;
}

/* Selector Manager Class Tags */
.gjs-clm-c {
  padding: 10px !important;
  background-color: rgba(0, 0, 0, 0.15) !important;
  border-radius: 8px !important;
  border: 1px solid var(--border-color) !important;
  margin: 10px !important;
}

.gjs-clm-header {
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  color: var(--text-secondary) !important;
  font-weight: 700 !important;
  margin-bottom: 6px !important;
}

.gjs-clm-header-status {
  color: var(--text-muted) !important;
  font-size: 10px !important;
}

.gjs-clm-tags-field {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-top: 6px !important;
  flex-wrap: wrap !important;
}

.gjs-clm-tags-field input {
  background: #0f121d !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: 4px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  outline: none !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.gjs-clm-tags-field input:focus {
  border-color: var(--accent-cyan) !important;
}

.gjs-clm-add-btn {
  background-color: var(--accent-cyan) !important;
  color: #000 !important;
  border-radius: 4px !important;
  padding: 4px 8px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  border: none !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
  font-size: 14px !important;
  line-height: 1 !important;
}

.gjs-clm-add-btn:hover {
  background-color: #ffffff !important;
}

.gjs-clm-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  margin-top: 6px !important;
}

.gjs-clm-tag {
  background-color: rgba(0, 240, 255, 0.08) !important;
  border: 1px solid rgba(0, 240, 255, 0.2) !important;
  color: var(--accent-cyan) !important;
  border-radius: 4px !important;
  padding: 3px 8px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin: 0 !important;
  transition: all 0.2s ease !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.gjs-clm-tag:hover {
  background-color: rgba(0, 240, 255, 0.15) !important;
  border-color: rgba(0, 240, 255, 0.35) !important;
}

.gjs-clm-tag-close {
  color: var(--accent-cyan) !important;
  opacity: 0.6 !important;
  font-size: 10px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

.gjs-clm-tag-close:hover {
  color: #ff5252 !important;
  opacity: 1 !important;
}

/* Selector Manager Select (State dropdown) */
.gjs-clm-select {
  background-color: #0f121d !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: 4px !important;
  padding: 3px 6px !important;
  font-size: 10px !important;
  outline: none !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='12' viewBox='0 0 24 24' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 4px center !important;
  background-size: 10px !important;
  padding-right: 16px !important;
}

.gjs-clm-select:focus {
  border-color: var(--accent-cyan) !important;
}

/* Custom GrapesJS Range Slider Styling */
.gjs-field input[type="range"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100% !important;
  background: transparent !important;
  cursor: pointer !important;
  padding: 0 !important;
}

.gjs-field input[type="range"]::-webkit-slider-runnable-track {
  width: 100% !important;
  height: 4px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 2px !important;
}

.gjs-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  height: 12px !important;
  width: 12px !important;
  border-radius: 50% !important;
  background: var(--accent-cyan) !important;
  margin-top: -4px !important;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.5) !important;
  transition: all 0.1s ease !important;
}

.gjs-field input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2) !important;
  background: #fff !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8) !important;
}

.gjs-field input[type="range"]::-moz-range-track {
  width: 100% !important;
  height: 4px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 2px !important;
}

.gjs-field input[type="range"]::-moz-range-thumb {
  height: 12px !important;
  width: 12px !important;
  border: none !important;
  border-radius: 50% !important;
  background: var(--accent-cyan) !important;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.5) !important;
  transition: all 0.1s ease !important;
}

.gjs-field input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2) !important;
  background: #fff !important;
}

/* GrapesJS Layer Manager Custom Styling */
.gjs-layer {
  background-color: transparent !important;
  color: var(--text-secondary) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02) !important;
  padding: 8px 10px !important;
  transition: all 0.2s ease !important;
  font-family: inherit !important;
}

.gjs-layer:hover {
  background-color: rgba(255, 255, 255, 0.03) !important;
  color: var(--text-primary) !important;
}

.gjs-layer.gjs-layer-active {
  background-color: rgba(0, 240, 255, 0.05) !important;
  border-left: 3px solid var(--accent-cyan) !important;
  color: var(--text-primary) !important;
}

.gjs-layer-title {
  font-size: 12px !important;
  font-weight: 500 !important;
}

.gjs-layer-name {
  color: var(--text-secondary) !important;
}

.gjs-layer-active .gjs-layer-name {
  color: var(--text-primary) !important;
}

.gjs-layer-icon {
  opacity: 0.7 !important;
  margin-right: 6px !important;
}

.gjs-layer-active .gjs-layer-icon {
  opacity: 1 !important;
  color: var(--accent-cyan) !important;
}

.gjs-layer-count {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-secondary) !important;
  border-radius: 10px !important;
  padding: 1px 6px !important;
  font-size: 9px !important;
}

/* Rich Text Editor Customize */
.gjs-rte-actionbar {
  background-color: var(--bg-tertiary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  box-shadow: var(--glass-shadow) !important;
}

.gjs-rte-action {
  color: var(--text-secondary) !important;
}

.gjs-rte-action:hover {
  color: var(--text-primary) !important;
  background-color: rgba(255,255,255,0.05) !important;
}

/* Custom Modal / Notifications */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-cyan);
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  transform: translateY(150%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification.show {
  transform: translateY(0);
}

.notification.success {
  border-left-color: var(--accent-success);
}

.notification.error {
  border-left-color: #ef4444;
}

.notification-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 2px;
}

.notification-message {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  width: 500px;
  max-width: 90%;
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
  padding: 25px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal-header {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-code-box {
  background: #07080d;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-family: monospace;
  font-size: 12px;
  color: var(--accent-cyan);
  margin-top: 10px;
  word-break: break-all;
}

/* Publish target chooser */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.publish-target-overlay {
  z-index: 1120;
  background: rgba(3, 6, 12, 0.82);
}

.publish-target-modal {
  width: min(640px, calc(100vw - 32px));
  max-width: 640px;
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border-color: rgba(94, 234, 246, 0.18);
  background: #111520;
  box-shadow: 0 28px 70px rgba(0, 6, 16, 0.58);
}

.publish-target-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d111a;
}

.publish-target-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.publish-target-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.09);
  border: 1px solid rgba(103, 232, 249, 0.22);
}

.publish-target-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #67e8f9;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.publish-target-heading h2 {
  margin: 0;
  color: #f8fafc;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.publish-target-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.32, 0.72, 0, 1), color 180ms ease, background-color 180ms ease;
}

.publish-target-close:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.publish-target-close:focus-visible,
.publish-target-cancel:focus-visible,
.publish-target-submit:focus-visible {
  outline: 2px solid #67e8f9;
  outline-offset: 3px;
}

.publish-target-body {
  max-height: calc(100dvh - 138px);
  padding: 20px 22px 22px;
  overflow-y: auto;
}

#publish-target-description {
  max-width: 62ch;
  margin: 0;
  color: #aeb9c9;
  font-size: 13px;
  line-height: 1.65;
}

.publish-target-domain {
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
}

.publish-target-domain strong {
  color: #f8fafc;
  font-weight: 650;
}

.publish-target-fieldset {
  min-width: 0;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.publish-target-list {
  display: grid;
  gap: 9px;
}

.publish-target-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.publish-target-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.publish-target-option-card {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 15px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #151a25;
  transition: transform 180ms cubic-bezier(0.32, 0.72, 0, 1), border-color 180ms ease, background-color 180ms ease;
}

.publish-target-option:hover .publish-target-option-card {
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.28);
  background: #181e2a;
}

.publish-target-option input:focus-visible + .publish-target-option-card {
  outline: 2px solid #67e8f9;
  outline-offset: 3px;
}

.publish-target-option input:checked + .publish-target-option-card {
  border-color: rgba(103, 232, 249, 0.65);
  background: rgba(21, 39, 50, 0.92);
}

.publish-target-radio {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #64748b;
  background: #0d111a;
}

.publish-target-radio::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #67e8f9;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 160ms ease, transform 160ms cubic-bezier(0.32, 0.72, 0, 1);
}

.publish-target-option input:checked + .publish-target-option-card .publish-target-radio {
  border-color: #67e8f9;
}

.publish-target-option input:checked + .publish-target-option-card .publish-target-radio::after {
  opacity: 1;
  transform: scale(1);
}

.publish-target-option-content {
  min-width: 0;
}

.publish-target-option-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.publish-target-option-label {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.publish-target-option-path {
  display: block;
  margin-top: 3px;
  color: #67e8f9;
  font-family: 'Share Tech Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.publish-target-badges {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.publish-target-badge {
  padding: 3px 7px;
  border-radius: 5px;
  color: #b7c4d6;
  background: rgba(255, 255, 255, 0.055);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
}

.publish-target-badge.recommended {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
}

.publish-target-option-reason {
  display: block;
  margin-top: 8px;
  color: #94a3b8;
  font-size: 11.5px;
  line-height: 1.5;
}

.publish-target-items {
  display: block;
  margin-top: 7px;
  color: #7f8ca0;
  font-size: 10.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.publish-target-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: #fca5a5;
  font-size: 11.5px;
  line-height: 1.5;
}

.publish-target-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.publish-target-cancel,
.publish-target-submit {
  min-height: 40px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 650;
}

.publish-target-cancel {
  padding: 9px 15px;
}

.publish-target-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 16px;
  color: #061014;
  background: #67e8f9;
  border: 0;
  box-shadow: none;
  transition: transform 180ms cubic-bezier(0.32, 0.72, 0, 1), background-color 180ms ease;
}

.publish-target-submit:hover {
  background: #8deef9;
  transform: translateY(-1px);
}

.publish-target-submit:active {
  transform: scale(0.98);
}

.publish-target-submit:disabled,
.publish-target-cancel:disabled,
.publish-target-close:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

@media (max-width: 560px) {
  .publish-target-modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 13px;
  }

  .publish-target-header,
  .publish-target-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .publish-target-option-topline {
    display: block;
  }

  .publish-target-badges {
    justify-content: flex-start;
    margin-top: 8px;
  }

  .publish-target-actions {
    flex-direction: column-reverse;
  }

  .publish-target-cancel,
  .publish-target-submit {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .publish-target-overlay,
  .publish-target-modal,
  .publish-target-option-card,
  .publish-target-radio::after,
  .publish-target-close,
  .publish-target-submit {
    transition: none !important;
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.15);
}

/* Template Gallery Grid & Cards inside Modal */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.template-card {
  background: #141722;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  position: relative;
}

.template-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 25px rgba(0, 240, 255, 0.25);
}

.template-card-img {
  height: 125px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border-color);
  transition: transform 0.5s ease;
}

.template-card:hover .template-card-img {
  transform: scale(1.05);
}

.template-card-info {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.template-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.template-card-tag {
  font-size: 10px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Premium Temalar Bölümü */
.template-section-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.4px;
  margin-top: 6px;
}

.template-section-title i {
  color: var(--accent-cyan);
  font-size: 14px;
}

.premium-section-title i {
  color: #fbbf24;
}

.premium-section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-color), transparent);
}

.premium-section-title .premium-section-line {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.45), transparent);
}

.template-card.premium {
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: linear-gradient(165deg, #1b1a14 0%, #141722 55%);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.12), 0 8px 22px rgba(0, 0, 0, 0.35);
}

.template-card.premium:hover {
  transform: translateY(-4px);
  border-color: #fbbf24;
  box-shadow: 0 10px 28px rgba(251, 191, 36, 0.3);
}

.template-card.premium .template-card-tag {
  color: #fbbf24;
}

.premium-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #131520;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 9px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
  animation: premiumBadgeGlow 2.6s ease-in-out infinite;
}

@keyframes premiumBadgeGlow {
  0%, 100% { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45); }
  50% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.8); }
}

/* "Devamı Gelecek" (Yakında) kartı — Isıtek kombi teması renk paleti (lacivert + ember + cyan) */
.template-card.coming-soon {
  border: 1px dashed rgba(45, 212, 191, 0.45);
  background: radial-gradient(circle at 80% 15%, rgba(45,212,191,0.12) 0%, transparent 45%),
              radial-gradient(circle at 15% 90%, rgba(255,106,67,0.12) 0%, transparent 45%),
              linear-gradient(165deg, #0d1a2e 0%, #0a1424 60%);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.1), 0 8px 22px rgba(0, 0, 0, 0.4);
}
.template-card.coming-soon:hover {
  transform: translateY(-4px);
  border-color: #2dd4bf;
  box-shadow: 0 10px 28px rgba(45, 212, 191, 0.28);
}
.coming-soon-badge {
  position: absolute;
  top: 9px; right: 9px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #ff6a43 0%, #ff8a3d 100%);
  color: #0a1424; font-size: 9px; font-weight: 800; letter-spacing: 1px;
  padding: 4px 9px; border-radius: 50px;
  box-shadow: 0 4px 12px rgba(255, 106, 67, 0.45);
  animation: comingSoonBadgePulse 2.4s ease-in-out infinite;
}
@keyframes comingSoonBadgePulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(255, 106, 67, 0.45); }
  50% { box-shadow: 0 4px 20px rgba(255, 106, 67, 0.85); }
}
.coming-soon-body {
  flex: 1; min-height: 215px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 26px 18px; position: relative; overflow: hidden;
}
.coming-soon-glow {
  position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(45,212,191,0.22) 0%, transparent 70%);
  animation: comingSoonFloat 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes comingSoonFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.8; }
  50% { transform: translateX(-50%) translateY(14px); opacity: 1; }
}
.coming-soon-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(140deg, rgba(45,212,191,0.18) 0%, rgba(255,106,67,0.18) 100%);
  border: 1px solid rgba(45, 212, 191, 0.4);
  display: inline-flex; align-items: center; justify-content: center;
  color: #2dd4bf; font-size: 23px; margin-bottom: 16px; position: relative; z-index: 1;
}
.coming-soon-title {
  margin: 0 0 8px 0; font-size: 16px; font-weight: 800; color: #f3f7fc;
  position: relative; z-index: 1;
}
.coming-soon-text {
  margin: 0 0 16px 0; font-size: 12px; line-height: 1.55; color: #9fb0c6;
  max-width: 200px; position: relative; z-index: 1;
}
.coming-soon-dots { display: inline-flex; gap: 6px; position: relative; z-index: 1; }
.coming-soon-dots i {
  width: 7px; height: 7px; border-radius: 50%; background: #2dd4bf; display: inline-block;
  animation: comingSoonDots 1.4s ease-in-out infinite;
}
.coming-soon-dots i:nth-child(2) { background: #ff8a3d; animation-delay: 0.2s; }
.coming-soon-dots i:nth-child(3) { background: #ff6a43; animation-delay: 0.4s; }
@keyframes comingSoonDots {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

/* Şablon arama — sonuç yok durumu */
.template-empty-state {
  grid-column: 1 / -1;
  text-align: center; padding: 60px 20px; color: var(--text-secondary);
}
.template-empty-state i { font-size: 34px; color: var(--border-color); margin-bottom: 16px; }
.template-empty-state p { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0 0 6px 0; }
.template-empty-state span { font-size: 13px; }

/* Premium tema varyant seçim modalı */
.premium-variant-overlay {
  position: fixed; inset: 0; z-index: 12000;
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.premium-variant-modal {
  position: relative; width: 100%; max-width: 560px;
  background: linear-gradient(160deg, #14161f 0%, #0e1016 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 16px; padding: 30px 28px 28px 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  animation: premiumVariantIn 0.25s ease;
}
@keyframes premiumVariantIn {
  0% { opacity: 0; transform: translateY(14px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.premium-variant-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-color);
  color: var(--text-secondary); cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.premium-variant-close:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.premium-variant-head { text-align: center; margin-bottom: 24px; }
.premium-variant-head .premium-badge { position: static; display: inline-flex; margin-bottom: 14px; }
.premium-variant-head h3 { color: #fff; font-size: 21px; margin: 0 0 8px 0; }
.premium-variant-head p { color: var(--text-secondary); font-size: 13.5px; margin: 0; }
.premium-variant-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.premium-variant-option {
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-color);
  border-radius: 12px; padding: 18px 16px; cursor: pointer; text-align: center;
  transition: transform 0.2s, border-color 0.2s; font-family: inherit;
}
.premium-variant-option:hover { transform: translateY(-4px); border-color: rgba(245, 158, 11, 0.65); }
.premium-variant-preview {
  display: flex; align-items: center; justify-content: center;
  height: 84px; border-radius: 9px; margin-bottom: 14px; font-size: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.premium-variant-option strong { display: block; color: #fff; font-size: 15px; margin-bottom: 6px; }
.premium-variant-option small { display: block; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
@media (max-width: 560px) {
  .premium-variant-options { grid-template-columns: 1fr; }
}

/* GrapesJS Block Manager Categories Styling */
.gjs-block-category {
  border-bottom: 1px solid var(--border-color) !important;
  background-color: rgba(255, 255, 255, 0.01) !important;
}

.gjs-block-category .gjs-title {
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 14px 18px !important;
  background-color: rgba(255, 255, 255, 0.01) !important;
  border-left: 3px solid var(--accent-purple) !important;
  cursor: pointer;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.gjs-block-category .gjs-title:hover {
  background-color: rgba(255, 255, 255, 0.04) !important;
  border-left-color: var(--accent-cyan) !important;
}

.gjs-block-category .gjs-blocks-c {
  padding: 12px !important;
  background-color: rgba(0, 0, 0, 0.15) !important;
  display: grid;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
}

/* Make block elements look beautiful and readable */
.gjs-block {
  width: 100% !important;
  min-height: 85px !important;
  background-color: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 6px !important;
  color: var(--text-secondary) !important;
  margin-bottom: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 6px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: grab !important;
  text-align: center !important;
}

.gjs-block:hover {
  border-color: var(--accent-cyan) !important;
  color: var(--text-primary) !important;
  background-color: rgba(0, 240, 255, 0.04) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 240, 255, 0.1);
}

.gjs-block svg {
  width: 20px !important;
  height: 20px !important;
  margin-bottom: 6px !important;
  stroke: currentColor;
  opacity: 0.8;
  transition: all 0.2s ease;
}

.gjs-block:hover svg {
  stroke: var(--accent-cyan);
  opacity: 1;
  transform: scale(1.1);
}

.gjs-block-label {
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px;
  line-height: 1.2 !important;
  margin-top: 0 !important;
}

/* Hide empty GrapesJS views container and expand canvas */
.gjs-pn-views-container {
  display: none !important;
}

.gjs-cv-canvas {
  top: 48px !important;
  height: calc(100% - 48px) !important;
  width: 100% !important;
  right: 0 !important;
  left: 0 !important;
}

/* Topbar Header Text Overlap & Wrapping Fixes */
header button, 
header input,
.logo-section h1,
.logo-section span {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.logo-section {
  flex-shrink: 0 !important;
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0 !important;
}

/* Responsive Scaling for Controls Section */
@media (max-width: 1400px) {
  .btn-extra-text {
    display: none !important;
  }
  .controls-section {
    gap: 8px !important;
    margin: 0 10px !important;
  }
  .action-section {
    gap: 8px !important;
  }
}

@media (max-width: 1250px) {
  /* Hide the Prototip badge */
  .logo-section span {
    display: none !important;
  }
  
  /* Collapse controls section secondary buttons to icon-only */
  .controls-section .btn-secondary .btn-text {
    display: none !important;
  }
  .controls-section .btn-secondary {
    gap: 0 !important;
    padding: 8px 10px !important;
  }
  
  /* Hide pages label */
  .pages-label {
    display: none !important;
  }
}

@media (max-width: 1100px) {
  /* Hide import button text to make it icon-only */
  .control-group .btn-primary .btn-text {
    display: none !important;
  }
  .control-group .btn-primary {
    gap: 0 !important;
    padding: 0 12px !important;
  }
  
  /* Shrink import input box */
  .import-input {
    width: 120px !important;
  }
}

@media (max-width: 1024px) {
  /* Collapse logo to symbol only */
  .logo-section h1 {
    display: none !important;
  }
  .logo-section {
    gap: 0 !important;
  }
  
  /* Collapse right-side actions to icon-only */
  .action-section .btn-text {
    display: none !important;
  }
  .action-section button {
    gap: 0 !important;
    padding: 10px 12px !important;
    margin: 0 !important;
  }
  .action-section {
    gap: 6px !important;
  }
  
  /* Shrink import input further */
  .import-input {
    width: 90px !important;
  }
}

/* GrapesJS Canvas Component Highlighter & Badge Custom Styling */
.gjs-highlighter {
  outline: 1px dashed var(--accent-cyan) !important;
}

.gjs-badge {
  background-color: var(--accent-cyan) !important;
  color: #000000 !important;
  font-family: inherit !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(0, 240, 255, 0.3) !important;
  padding: 3px 8px !important;
}

/* GrapesJS Canvas Drag Dragging Placeholder */
.gjs-placeholder {
  border: 1px dashed var(--accent-cyan) !important;
  background-color: rgba(0, 240, 255, 0.05) !important;
}

/* ========================================== */
/* Comprehensive GrapesJS Editor Chrome Theme */
/* ========================================== */

/* GrapesJS Editor Wrapper */
.gjs-editor {
  background-color: #0b0c13 !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

/* GrapesJS all top-level containers */
.gjs-one-bg {
  background-color: #0c0d12 !important;
}

.gjs-two-color {
  color: var(--text-primary) !important;
}

.gjs-three-bg {
  background-color: rgba(255, 255, 255, 0.03) !important;
  color: var(--text-primary) !important;
}

.gjs-four-color, .gjs-four-color-h:hover {
  color: var(--accent-cyan) !important;
}

/* Empty state messages (when no element selected) */
.gjs-sm-sector .gjs-sm-properties .gjs-sm-property__empty,
.gjs-sm-sectors .gjs-sm-sectors__empty,
.gjs-sm-sector--empty,
.gjs-sm-empty,
.gjs-trt-traits--empty,
.gjs-empty-state {
  color: var(--text-muted) !important;
  font-size: 12px !important;
  padding: 20px 12px !important;
  text-align: center !important;
  background-color: transparent !important;
}

/* Fix for GrapesJS modal dialogs */
.gjs-mdl-dialog {
  background-color: #161925 !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 10px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

.gjs-mdl-header {
  background-color: transparent !important;
  border-bottom: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  font-weight: 700 !important;
}

.gjs-mdl-title {
  color: var(--text-primary) !important;
  font-weight: 700 !important;
}

.gjs-mdl-content {
  background-color: transparent !important;
  color: var(--text-secondary) !important;
}

.gjs-mdl-btn-close {
  color: var(--text-secondary) !important;
  font-size: 18px !important;
}

.gjs-mdl-btn-close:hover {
  color: var(--text-primary) !important;
}

.gjs-mdl-container {
  background-color: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(4px) !important;
}

/* GrapesJS Toolbar on selected elements */
.gjs-toolbar {
  background-color: #161925 !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.gjs-toolbar-item {
  color: var(--text-secondary) !important;
  transition: color 0.15s ease !important;
}

.gjs-toolbar-item:hover {
  color: var(--accent-cyan) !important;
}

/* GrapesJS Resizer handles */
.gjs-resizer-h {
  border: 2px solid var(--accent-cyan) !important;
  border-radius: 50% !important;
  background: #0c0d12 !important;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.4) !important;
}

/* Fix for any remaining gray GrapesJS chrome */
.gjs-frame-wrapper,
.gjs-frame-wrapper__top,
.gjs-frame-wrapper__right,
.gjs-frame-wrapper__bottom,
.gjs-frame-wrapper__left {
  background-color: #0b0c13 !important;
}

/* GrapesJS context menu */
.gjs-cm-editor {
  background-color: #161925 !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
}

/* Style Manager - Sector open/close indicator arrows */
.gjs-sm-sector .gjs-sm-title .gjs-caret-icon,
.gjs-sm-sector .gjs-sm-title::before {
  color: var(--text-muted) !important;
}

/* Fix for style manager empty info text */
.gjs-sm-sectors .gjs-sm-no-element,
.gjs-sm-no-element {
  color: var(--text-muted) !important;
  font-size: 12px !important;
  padding: 20px !important;
  text-align: center !important;
  line-height: 1.5 !important;
}

/* GrapesJS general select/input fallbacks */
.gjs-field select {
  font-size: 11px !important;
}

/* Apply custom font to GrapesJS TEXT elements only (not icons) */
.gjs-sm-title,
.gjs-sm-label,
.gjs-sm-property,
.gjs-field,
.gjs-field input,
.gjs-field select,
.gjs-clm-header,
.gjs-clm-tag,
.gjs-layer-title,
.gjs-layer-name,
.gjs-trt-trait,
.gjs-trt-trait .gjs-label,
.gjs-block-label,
.gjs-mdl-title,
.gjs-mdl-content {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

/* GrapesJS Asset Manager theming */
.gjs-am-assets-cont {
  background-color: #0c0d12 !important;
}

.gjs-am-assets-header {
  background-color: transparent !important;
  color: var(--text-primary) !important;
}

.gjs-am-file-uploader {
  background-color: rgba(255, 255, 255, 0.02) !important;
  border: 2px dashed var(--border-color) !important;
  border-radius: 8px !important;
  color: var(--text-secondary) !important;
}

.gjs-am-file-uploader:hover {
  border-color: var(--accent-cyan) !important;
  background-color: rgba(0, 240, 255, 0.02) !important;
}

/* Fix double dashed border in Asset Manager Uploader */
.gjs-am-file-uploader * {
  border: none !important;
  outline: none !important;
}

/* Right panel scrollbar containment */
#right-panel {
  overflow: hidden !important;
}

#right-panel > * {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* ========================================== */
/* GrapesJS Stack Property & Layer Styling Overrides */
/* ========================================== */

.gjs-sm-stack {
  overflow: visible !important; /* Allow nested popups like color picker or unit select to overflow */
}

.gjs-sm-layer {
  background-color: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  margin-bottom: 6px !important;
  padding: 8px 10px !important;
  color: var(--text-primary) !important;
  display: flex !important;
  flex-direction: column !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  height: auto !important; /* Allow vertical expansion when open/active */
  overflow: visible !important;
}

.gjs-sm-layer:hover {
  border-color: rgba(255, 255, 255, 0.15) !important;
  background-color: rgba(255, 255, 255, 0.04) !important;
}

.gjs-sm-layer-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

.gjs-sm-layer-preview {
  width: 16px !important;
  height: 16px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  margin-right: 8px !important;
  flex-shrink: 0 !important;
}

.gjs-sm-layer-label {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: var(--text-secondary) !important;
  flex: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.gjs-sm-layer.gjs-sm-layer-active {
  border-color: var(--accent-cyan) !important;
  background-color: rgba(0, 240, 255, 0.04) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1) !important;
}

.gjs-sm-layer.gjs-sm-layer-active .gjs-sm-layer-label {
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* Delete / Action buttons inside stack layer */
.gjs-sm-layer-actions,
.gjs-sm-layer-control {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.gjs-sm-layer-actions i,
.gjs-sm-layer-control i,
.gjs-sm-layer-actions span,
.gjs-sm-layer-control span {
  cursor: pointer !important;
  color: var(--text-muted) !important;
  transition: color 0.15s ease !important;
  font-size: 11px !important;
}

.gjs-sm-layer-actions i:hover,
.gjs-sm-layer-control i:hover,
.gjs-sm-layer-actions span:hover,
.gjs-sm-layer-control span:hover {
  color: #ff5252 !important;
}

/* Sub-properties container inside active stack layer */
.gjs-sm-stack .gjs-sm-properties {
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  width: 100% !important;
  overflow: visible !important;
}

.gjs-sm-stack .gjs-sm-properties .gjs-sm-property {
  flex: 1 1 calc(50% - 4px) !important;
  min-width: 0 !important;
  margin-bottom: 0 !important;
  overflow: visible !important;
}

/* Color and Type properties inside stack should span full width */
.gjs-sm-stack .gjs-sm-properties .gjs-sm-property-color,
.gjs-sm-stack .gjs-sm-properties .gjs-sm-property__color,
.gjs-sm-stack .gjs-sm-properties [class*="color"],
.gjs-sm-stack .gjs-sm-properties [class*="type"],
.gjs-sm-stack .gjs-sm-properties .gjs-sm-property-select,
.gjs-sm-stack .gjs-sm-properties .gjs-sm-property__select {
  flex: 1 1 100% !important;
}

/* Fix text clipping inside GrapesJS input fields */
.gjs-field input {
  padding: 0 !important;
  margin: 0 !important;
  line-height: normal !important;
  box-sizing: border-box !important;
  height: 100% !important;
}

/* Positional and layout overrides for unit selectors inside fields */
.gjs-field-unit {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  height: 100% !important;
  width: 32px !important;
  margin: 0 !important;
  padding: 0 10px 0 4px !important;
  line-height: 28px !important;
  background-color: transparent !important;
  border: none !important;
  color: var(--accent-cyan) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml;utf8,<svg fill='rgb(0,240,255)' height='12' viewBox='0 0 24 24' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 2px center !important;
  background-size: 8px !important;
  box-sizing: border-box !important;
}

/* Page switcher settings button styling */
.page-action-btn.settings-btn {
  color: var(--text-secondary);
  border-color: var(--border-color);
}
.page-action-btn.settings-btn:hover {
  color: var(--accent-cyan);
  border-color: rgba(0, 240, 255, 0.25);
  background: rgba(0, 240, 255, 0.05);
}

/* SEO Container Input & Textarea Styling */
#seo-container input:focus,
#seo-container textarea:focus {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.18) !important;
}

.btn-logout-custom:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  transform: translateY(-1px) !important;
}

/* ====================================================== */
/* BEF AI Yapay Zeka Tasarım Asistanı Arayüz Tasarımı */
/* ====================================================== */

/* Floating Toggle Button */
.bef-ai-toggle-btn {
  position: fixed;
  bottom: 80px;
  right: 25px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7000ff 0%, #00f0ff 100%);
  border: none;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(112, 0, 255, 0.45);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.bef-ai-toggle-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.6);
}

.bef-ai-toggle-btn .pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  animation: ring-pulse 1.8s infinite;
  pointer-events: none;
}

@keyframes ring-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

/* Chat Sidebar Panel */
.bef-ai-chat-sidebar {
  position: fixed;
  top: 60px;
  right: -360px;
  width: 350px;
  height: calc(100vh - 80px);
  background: rgba(10, 11, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 12px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  z-index: 998;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  overflow: hidden;
}

.bef-ai-chat-sidebar.show {
  right: 20px;
}

/* Chat Header */
.bef-ai-chat-sidebar .chat-header {
  padding: 16px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-logo-glow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
  transition: all 0.3s ease;
}

.chat-logo-glow i {
  transition: color 0.3s ease;
}

.chat-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
  padding: 0 5px;
  line-height: 1;
}

.chat-close-btn:hover {
  color: #ff5252;
}

/* Messages Stream */
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.chat-msg.system {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  max-width: 100%;
  border-radius: 8px;
  font-style: normal;
}

.chat-msg.user {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.05);
}

.chat-msg.ai {
  background: rgba(112, 0, 255, 0.08);
  border: 1px solid rgba(112, 0, 255, 0.25);
  color: #e2e8f0;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  box-shadow: 0 2px 10px rgba(112, 0, 255, 0.05);
}

.chat-msg.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  max-width: 100%;
  border-radius: 8px;
}

.chat-msg.ai strong, .chat-msg.system strong {
  color: #ffffff;
  font-weight: 600;
}

.chat-msg.system-feedback {
  background: rgba(0, 240, 255, 0.05);
  border: 1px dashed rgba(0, 240, 255, 0.3);
  color: #a5f3fc;
  font-size: 11px;
  max-width: 100%;
  border-radius: 8px;
  align-self: center;
  padding: 6px 12px;
}

/* Typing Indicator Animation */
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  align-items: center;
  justify-content: center;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-secondary);
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* Chat Input Section */
.chat-input-area {
  padding: 14px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-limit-counter {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: right;
  letter-spacing: 0.5px;
}

.chat-send-btn {
  background: linear-gradient(135deg, #7000ff 0%, #00f0ff 100%);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(112, 0, 255, 0.2);
  flex-shrink: 0;
}

.chat-send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}

.chat-send-btn:active {
  transform: translateY(1px);
}

/* AI Assistant Balloon */
.bef-ai-balloon {
  position: fixed;
  bottom: 150px;
  right: 25px;
  width: 260px;
  padding: 12px 16px;
  background: rgba(10, 11, 18, 0.95);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 240, 255, 0.2);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bef-ai-balloon.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.bef-ai-balloon::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 22px;
  width: 10px;
  height: 10px;
  background: #0a0b12;
  border-right: 1px solid rgba(0, 240, 255, 0.35);
  border-bottom: 1px solid rgba(0, 240, 255, 0.35);
  transform: rotate(45deg);
}

.bef-ai-balloon-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
}

.bef-ai-balloon-close:hover {
  color: #ff5252;
}

.bef-ai-balloon-content {
  padding-right: 12px;
  cursor: pointer;
  text-align: left;
}

/* ====================================================== */
/* BEF AI Tasarım Beyni Paneli Styling */
/* ====================================================== */

.bef-ai-brain-sidebar {
  position: fixed;
  top: 60px;
  width: 350px;
  height: calc(100vh - 80px);
  background: rgba(10, 11, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 12px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  z-index: 998;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  right: -360px;
}

/* Desktop position: side-by-side with chat sidebar */
@media (min-width: 768px) {
  .bef-ai-brain-sidebar.show {
    right: 380px; /* 20px right margin + 350px chat sidebar width + 10px gap */
  }
}

/* Mobile position: overlay chat sidebar */
@media (max-width: 767px) {
  .bef-ai-brain-sidebar {
    width: calc(100vw - 40px);
    right: -100%;
    border-right: none;
    border-left: 1px solid rgba(0, 240, 255, 0.2);
  }
  .bef-ai-brain-sidebar.show {
    right: 20px;
  }
}

.brain-header {
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brain-logo-glow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(234, 88, 12, 0.1);
  border: 1px solid rgba(234, 88, 12, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.2);
}

.brain-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
  padding: 0 5px;
  line-height: 1;
}

.brain-close-btn:hover {
  color: #ff5252;
}

.brain-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brain-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 14px;
}

.brain-section h4 {
  margin: 0 0 10px 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.8px;
}

.brain-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.brain-group label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brain-group input[type="text"],
.brain-group textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: #12131a;
  color: #fff;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}

.brain-group input[type="text"]:focus,
.brain-group textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}

/* Color Controls */
.brain-colors-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.brain-color-box {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s, border-color 0.2s;
  box-sizing: border-box;
}

.brain-color-box:hover {
  transform: scale(1.08);
  border-color: #ffffff;
}

.brain-color-box input[type="color"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

.brain-color-box .remove-color-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff5252;
  border: none;
  color: #fff;
  font-size: 8px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  padding: 0;
  line-height: 1;
}

.brain-color-box .remove-color-btn:hover {
  background: #ff3838;
}

.brain-mini-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.brain-mini-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.brain-mini-btn.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ff8888;
  border-color: #ff5252;
}

/* Preset Palettes */
.brain-presets-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.brain-preset-pill {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.brain-preset-pill:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.05);
}

.brain-preset-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.brain-preset-desc {
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.2;
}

.brain-preset-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brain-preset-colors {
  display: flex;
  gap: 3px;
}

.brain-preset-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.brain-preset-tag {
  font-size: 8px;
  background: rgba(255,255,255,0.06);
  color: #a0aec0;
  padding: 1px 4px;
  border-radius: 3px;
}

/* Design Vibes Grid & Tooltips */
.brain-vibes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.brain-vibe-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
  transition: all 0.15s ease;
}

.brain-vibe-item:hover {
  border-color: rgba(0, 240, 255, 0.2);
  background: rgba(0, 240, 255, 0.02);
}

.brain-vibe-item label {
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.brain-vibe-item input[type="checkbox"] {
  cursor: pointer;
  margin: 0;
}

/* Neon Cyberpunk Tooltips (Left/Right aligned based on column to fit sidebar) */
.brain-vibe-item .vibe-tooltip {
  visibility: hidden;
  width: 170px;
  background-color: #0d0e14;
  color: #e2e8f0;
  text-align: left;
  border-radius: 8px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1005;
  bottom: 125%; /* Display above the item */
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  transform: translateY(8px);
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
  font-size: 10px;
  line-height: 1.4;
  pointer-events: none;
}

/* Align left-column tooltips to left, right-column to right */
.brain-vibes-grid .brain-vibe-item:nth-child(odd) .vibe-tooltip {
  left: 0;
}

.brain-vibes-grid .brain-vibe-item:nth-child(even) .vibe-tooltip {
  right: 0;
}

.brain-vibe-item:hover .vibe-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}





.brain-fonts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}
.brain-fonts-grid::-webkit-scrollbar {
  width: 4px;
}
.brain-fonts-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.brain-font-card {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.brain-font-card:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.02);
}
.brain-font-card.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.05);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}
.brain-font-card.active::before {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--accent-cyan);
  font-size: 10px;
  font-weight: bold;
}
.brain-font-preview-h {
  font-size: 16px;
  line-height: 1.2;
  margin-bottom: 4px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brain-font-preview-p {
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.brain-font-meta {
  font-size: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 6px;
  margin-top: auto;
}

/* Custom Font Combinations Scoped Styles */
#brain-fonts-container {
  display: block;
  max-height: 450px;
  overflow-y: auto;
  padding-right: 6px;
}
#brain-fonts-container::-webkit-scrollbar {
  width: 4px;
}
#brain-fonts-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
#brain-fonts-container .sec {font-size:11px;font-weight:700;color:var(--text-secondary);letter-spacing:.07em;text-transform:uppercase;margin:1.4rem 0 .7rem}
#brain-fonts-container .grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}
#brain-fonts-container .fcard {
  background:rgba(255,255,255,0.02);
  border:1px solid rgba(255,255,255,0.05);
  border-radius:6px;
  padding:1.1rem 1.25rem;
  display:flex;
  flex-direction:column;
  gap:7px;
  cursor:pointer;
  transition:all 0.2s;
  position:relative;
}
#brain-fonts-container .fcard:hover { border-color:var(--accent-cyan); background:rgba(0,240,255,0.02); }
#brain-fonts-container .fcard.active { border-color:var(--accent-cyan); background:rgba(0,240,255,0.05); box-shadow:0 0 10px rgba(0,240,255,0.1); }
#brain-fonts-container .fcard.active::after { content: "✓"; position: absolute; top: 12px; right: 12px; color: var(--accent-cyan); font-size: 14px; font-weight: bold; }
#brain-fonts-container .tags {display:flex;gap:5px;flex-wrap:wrap}
#brain-fonts-container .tag {font-size:9.5px;padding:2px 7px;border-radius:20px;font-weight:600; font-family:var(--font-sans, 'Plus Jakarta Sans', sans-serif);}
#brain-fonts-container .t-hand {background:rgba(251,234,240,0.2);color:#ff9ebd}
#brain-fonts-container .t-robot {background:rgba(225,245,238,0.2);color:#9ef5d8}
#brain-fonts-container .t-bold {background:rgba(250,236,231,0.2);color:#ffb89e}
#brain-fonts-container .t-italic {background:rgba(238,237,254,0.2);color:#b3afff}
#brain-fonts-container .t-deco {background:rgba(250,238,218,0.2);color:#ffdb9e}
#brain-fonts-container .t-retro {background:rgba(230,241,251,0.2);color:#9ecfff}
#brain-fonts-container .t-modern {background:rgba(234,243,222,0.2);color:#c1f589}
#brain-fonts-container .t-editorial {background:rgba(241,239,232,0.2);color:#d1cfc4}
#brain-fonts-container .h {color:#fff;line-height:1.15;margin-bottom:2px}
#brain-fonts-container .body-text {font-size:12px;color:var(--text-secondary);line-height:1.45}
#brain-fonts-container .hr {border:none;border-top:1px solid rgba(255,255,255,0.05);margin:4px 0}
#brain-fonts-container .fn {font-size:11px;color:#a0aec0;}
#brain-fonts-container .imp {background:rgba(0,0,0,0.3);border-radius:4px;padding:6px 9px;font-family:monospace;font-size:9px;color:var(--text-muted);word-break:break-all;line-height:1.4;margin-top:2px}
#brain-fonts-container .num {display:inline-block;width:18px;height:18px;border-radius:50%;background:rgba(255,255,255,0.1);font-size:10px;font-weight:600;text-align:center;line-height:18px;color:#fff;margin-right:4px;flex-shrink:0}
#brain-fonts-container .card-head {display:flex;align-items:center;gap:4px}

/* ========================================== */
/* BEF Project Loader & Scrollbar Enhancements */
/* ========================================== */

.project-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 9, 13, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

.project-loader-overlay.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.loader-spinner {
  width: 90px;
  height: 90px;
  border: 4px solid rgba(0, 240, 255, 0.05);
  border-top: 4px solid var(--accent-cyan);
  border-bottom: 4px solid var(--accent-purple);
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.15), inset 0 0 20px rgba(144, 51, 255, 0.1);
}

.loader-logo-container {
  position: absolute;
  top: 27px; /* Centered relative to 90px spinner */
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  animation: loaderPulse 2s ease-in-out infinite;
}

.loader-message {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes loaderPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.6)) drop-shadow(0 0 15px rgba(144, 51, 255, 0.4));
  }
}

/* Sidebar Custom scrollbars */
#theme-container, #seo-container {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

#theme-container::-webkit-scrollbar, #seo-container::-webkit-scrollbar {
  width: 6px;
}

#theme-container::-webkit-scrollbar-track, #seo-container::-webkit-scrollbar-track {
  background: transparent;
}

#theme-container::-webkit-scrollbar-thumb, #seo-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

#theme-container::-webkit-scrollbar-thumb:hover, #seo-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Demo Modu Ek Kısıtlama Kuralları */
.is-demo-mode #btn-save-project {
  display: none !important;
}
.is-demo-mode .gjs-pn-btn[data-id="export-template"],
.is-demo-mode .gjs-pn-btn[data-id="gjs-open-import-webpage"],
.is-demo-mode .gjs-pn-btn[id*="export-template"],
.is-demo-mode .gjs-pn-btn[id*="open-import"] {
  display: none !important;
}

/* Mobil Uyumlu Düzen (Drawer ve Toggle Butonları) */
#mobile-toggles {
  display: none;
  position: fixed;
  bottom: 25px;
  left: 0;
  right: 0;
  justify-content: space-between;
  padding: 0 25px;
  z-index: 10020;
  pointer-events: none;
}

#mobile-toggles button {
  pointer-events: auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#btn-toggle-left-mobile {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #00a2ff 100%);
  color: #0d0e15;
  box-shadow: 0 5px 15px rgba(0, 240, 255, 0.4);
}

#btn-toggle-right-mobile {
  background: linear-gradient(135deg, var(--accent-purple) 0%, #9033ff 100%);
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(144, 51, 255, 0.4);
}

#panel-backdrop-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 10005;
}

/* Mobile Hamburger Default Styles (Hidden on Desktop) */
#btn-hamburger-mobile {
  display: none;
}
#mobile-menu-drawer {
  display: none;
}

@media (max-width: 768px) {
  #mobile-toggles {
    display: flex;
  }
  
  #left-panel {
    position: fixed !important;
    left: 0 !important;
    top: 55px !important;
    bottom: 0 !important;
    z-index: 10010 !important;
    width: 270px !important;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5) !important;
  }
  
  #left-panel.show-panel {
    transform: translateX(0) !important;
  }
  
  #right-panel {
    position: fixed !important;
    right: 0 !important;
    top: 55px !important;
    bottom: 0 !important;
    z-index: 10010 !important;
    width: 290px !important;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5) !important;
  }
  
  #right-panel.show-panel {
    transform: translateX(0) !important;
  }
  
  .panel-resize-handle {
    display: none !important;
  }
  
  /* Hide the entire middle controls section on mobile header, since they are inside the hamburger drawer */
  .controls-section {
    display: none !important;
  }

  /* Mobil Header Düzenlemeleri */
  header {
    height: 55px !important;
    padding: 0 12px !important;
    z-index: 10020 !important;
  }

  header .logo-section img {
    height: 32px !important;
  }

  /* Hide unnecessary right-side action buttons on mobile header (kept in hamburger menu) */
  header .action-section > *:not(#btn-publish):not(#btn-hamburger-mobile) {
    display: none !important;
  }

  header .action-section {
    gap: 10px !important;
  }

  /* Hamburger Menu Button Style Override for Mobile */
  #btn-hamburger-mobile {
    display: flex !important;
  }

  /* Premium Slide-Down Mobile Menu Drawer Animation Override */
  #mobile-menu-drawer {
    display: flex !important;
    transform: translateY(-120%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 10015 !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease !important;
  }

  #mobile-menu-drawer.show-drawer {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* AI Assistant Sidebars Mobil Uyumluluğu */
  .bef-ai-chat-sidebar, .bef-ai-brain-sidebar {
    width: calc(100vw - 30px) !important;
    right: -100% !important;
    top: 55px !important;
    height: calc(100vh - 70px) !important;
    border-right: none !important;
    border-left: 1px solid rgba(0, 240, 255, 0.2) !important;
  }

  .bef-ai-chat-sidebar.show, .bef-ai-brain-sidebar.show {
    right: 15px !important;
  }

  #workspace {
    top: 55px !important;
    height: calc(100% - 55px) !important;
  }

  #canvas-container {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  .modal-overlay .modal {
    max-height: 85vh !important;
    overflow-y: auto !important;
  }

  .gjs-block-category .gjs-blocks-c {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .gjs-cv-canvas {
    top: 0 !important;
    height: 100% !important;
  }

  /* GrapesJS Toolbar (Commands/Views switcher panel) horizontal scrolling and sizing on mobile */
  .gjs-pn-panels {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important; /* Firefox */
  }
  .gjs-pn-panels::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Opera */
  }
  .gjs-pn-options, 
  .gjs-pn-views {
    flex-shrink: 0 !important;
    gap: 4px !important;
  }
  .gjs-pn-btn {
    width: 30px !important;
    height: 30px !important;
    padding: 5px !important;
    font-size: 13px !important;
    flex-shrink: 0 !important;
  }
}
