/**
 * Golden Dreams Doodles — Site Editor Styles
 * WordPress-style visual customizer overlay
 */

/* ── Toolbar push-down ──────────────────────────────────────── */
body.editor-active {
  padding-top: 46px;
}

/* ── Edit Toolbar (top bar) ─────────────────────────────────── */
#editor-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 46px;
  background: #1A1209;
  border-bottom: 1px solid #3A2A10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 99990;
  gap: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 12px;
}

.etb-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #D4A853;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.etb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #E8774A;
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.etb-dot.visible {
  opacity: 1;
}

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

.etb-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 5px;
  border: 1px solid rgba(212, 168, 83, 0.25);
  background: rgba(212, 168, 83, 0.08);
  color: #D4A853;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.etb-btn:hover {
  background: rgba(212, 168, 83, 0.18);
  border-color: rgba(212, 168, 83, 0.5);
  color: #F0C56A;
}

.etb-btn.etb-save {
  background: #D4A853;
  border-color: #D4A853;
  color: #1A1209;
  font-weight: 600;
}

.etb-btn.etb-save:hover {
  background: #E0B96A;
  border-color: #E0B96A;
  color: #1A1209;
}

.etb-btn.etb-exit {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
}

.etb-btn.etb-exit:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.8);
}

/* ── Floating Activate Button ───────────────────────────────── */
#editor-activate-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: #1A1209;
  color: #D4A853;
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 24px;
  font-size: 12px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  cursor: pointer;
  z-index: 99980;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}

#editor-activate-btn:hover {
  background: #2A1E0A;
  border-color: rgba(212, 168, 83, 0.6);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

#editor-activate-btn.is-active {
  background: #D4A853;
  color: #1A1209;
  border-color: #D4A853;
}

/* ── Password Prompt ─────────────────────────────────────────── */
#editor-pw-prompt {
  position: fixed;
  background: #1A1209;
  border: 1px solid rgba(212, 168, 83, 0.25);
  border-radius: 10px;
  padding: 16px;
  z-index: 99995;
  width: 230px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.epw-title {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 10px;
}

.epw-row {
  display: flex;
  gap: 6px;
}

.epw-input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 168, 83, 0.2);
  border-radius: 5px;
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.epw-input:focus {
  border-color: rgba(212, 168, 83, 0.55);
}

.epw-btn {
  padding: 7px 13px;
  background: #D4A853;
  color: #1A1209;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.epw-btn:hover {
  background: #E0B96A;
}

.epw-error {
  margin: 8px 0 0;
  font-size: 11px;
  color: #E8774A;
  min-height: 14px;
}

/* ── Region Wrap & Handle ────────────────────────────────────── */
.editor-region-wrap {
  position: relative;
  outline: 2px dashed transparent;
  transition: outline-color 0.2s;
}

body.editor-active .editor-region-wrap {
  outline-color: rgba(212, 168, 83, 0.25);
}

body.editor-active .editor-region-wrap:hover {
  outline-color: rgba(212, 168, 83, 0.55);
}

.editor-region-handle {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #1A1209;
  color: #D4A853;
  border: 1px solid rgba(212, 168, 83, 0.4);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

body.editor-active .editor-region-wrap .editor-region-handle {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: background 0.15s, border-color 0.15s, opacity 0.2s, transform 0.2s;
}

.editor-region-handle:hover {
  background: #D4A853;
  color: #1A1209;
  border-color: #D4A853;
}

/* ── Region Edit Popover ─────────────────────────────────────── */
.editor-popover {
  position: fixed;
  width: 300px;
  background: #1A1209;
  border: 1px solid rgba(212, 168, 83, 0.2);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 99992;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.epop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(212, 168, 83, 0.12);
  flex-shrink: 0;
}

.epop-title {
  font-size: 12px;
  font-weight: 700;
  color: #D4A853;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.epop-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  padding: 0;
  flex-shrink: 0;
}

.epop-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.epop-body {
  padding: 12px 14px;
  overflow-y: auto;
  flex: 1;
}

.epop-row {
  margin-bottom: 12px;
}

.epop-row:last-child {
  margin-bottom: 0;
}

.epop-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}

.epop-input {
  width: 100%;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-radius: 6px;
  color: #F5EDD8;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
  resize: none;
}

.epop-input:focus {
  border-color: rgba(212, 168, 83, 0.5);
  background: rgba(255, 255, 255, 0.09);
}

.epop-textarea {
  min-height: 72px;
  resize: vertical;
}

.epop-divider {
  height: 1px;
  background: rgba(212, 168, 83, 0.1);
  margin: 14px -14px;
}

.epop-section-label {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

.epop-stat-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}

.epop-stat-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(212, 168, 83, 0.15);
  color: #D4A853;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.epop-input-half {
  flex: 1;
  min-width: 0;
}

/* ── Colors Panel ────────────────────────────────────────────── */
#editor-color-panel {
  position: fixed;
  width: 260px;
  background: #1A1209;
  border: 1px solid rgba(212, 168, 83, 0.2);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 99992;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ecp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(212, 168, 83, 0.12);
}

.ecp-title {
  font-size: 12px;
  font-weight: 700;
  color: #D4A853;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ecp-body {
  padding: 12px 14px;
}

.ecp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ecp-row:last-of-type {
  border-bottom: none;
}

.ecp-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.ecp-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ecp-swatch-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  cursor: pointer;
}

.ecp-picker {
  position: absolute;
  inset: 0;
  width: 130%;
  height: 130%;
  top: -15%;
  left: -15%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

.ecp-swatch {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 5px;
}

.ecp-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  padding: 0;
  flex-shrink: 0;
}

.ecp-reset:hover {
  color: #D4A853;
  background: rgba(212, 168, 83, 0.1);
}

.ecp-hint {
  margin: 12px 0 0;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}

/* ── Toast Notifications ─────────────────────────────────────── */
.editor-toast {
  position: fixed;
  bottom: 72px;
  right: 24px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  z-index: 99999;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.01em;
}

.editor-toast.editor-toast-in {
  opacity: 1;
  transform: translateY(0);
}

.editor-toast-success {
  background: #2A4A32;
  color: #74D68A;
  border: 1px solid rgba(116, 214, 138, 0.25);
}

.editor-toast-info {
  background: #2A2416;
  color: #D4A853;
  border: 1px solid rgba(212, 168, 83, 0.25);
}
