/* Celena CMS — runtime base styles + theme tokens. */
:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #f4f5f9;
  --surface-3: #eceef5;
  --border: #e6e8f0;
  --border-soft: rgba(148, 156, 184, 0.12);
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #6d5cff;
  --accent-2: #8b7bff;
  --accent-soft: rgba(109, 92, 255, 0.08);
  --accent-contrast: #ffffff;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow: var(--shadow-soft);
}

[data-theme="dark"] {
  --bg: #0a0d14;
  --surface: #12151f;
  --surface-2: #1a1e2b;
  --surface-3: #232838;
  --border: #262b3b;
  --border-soft: rgba(100, 116, 139, 0.16);
  --text: #e7e9f0;
  --text-muted: #94a3b8;
  --accent: #8b7bff;
  --accent-2: #a190ff;
  --accent-soft: rgba(139, 123, 255, 0.14);
  --accent-contrast: #ffffff;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.25), 0 2px 10px rgba(0, 0, 0, 0.18);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 6px 22px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  --shadow: var(--shadow-soft);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }

/* Async-блоки */
[data-celena-async] { min-height: 24px; transition: opacity .2s ease; }
[data-celena-async].is-loading { opacity: 0.5; }
[data-celena-async].is-error  { color: var(--danger); }
.celena-async-error { padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius); }

/* GDPR-баннер: фиксирован внизу, slide-in snackbar-style */
.celena-gdpr {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  z-index: 9000;
  background: var(--surface, #fff); color: var(--text, #111);
  border: 1px solid var(--border, #ddd); border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.18);
  transform: translateY(24px); opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.celena-gdpr.is-visible { transform: translateY(0); opacity: 1; }
.celena-gdpr-inner {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; flex-wrap: wrap;
  max-width: 1100px; margin: 0 auto;
}
.celena-gdpr-text { flex: 1; min-width: 260px; font-size: 14px; line-height: 1.5; }
.celena-gdpr-more { color: var(--accent, #6d5cff); text-decoration: underline; }
.celena-gdpr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.celena-gdpr-btn {
  padding: 9px 18px; border-radius: 8px; border: 1px solid transparent;
  font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.celena-gdpr-accept { background: var(--accent, #6d5cff); color: #fff; }
.celena-gdpr-accept:hover { filter: brightness(1.05); }
.celena-gdpr-decline { background: transparent; color: var(--text-muted, #6b7280); border-color: var(--border, #ddd); }
.celena-gdpr-decline:hover { color: var(--text, #111); border-color: var(--text-muted, #9ca3af); }
@media (max-width: 640px) {
  .celena-gdpr { left: 8px; right: 8px; bottom: 8px; }
  .celena-gdpr-inner { padding: 12px 14px; }
  .celena-gdpr-actions { width: 100%; }
  .celena-gdpr-btn { flex: 1; }
}
