/* EGATE sīkdatņu piekrišana — visas pogas vienādas */
:root {
  --egcc-primary: var(--primary, #f66722);
  --egcc-primary-hover: var(--primary-hover, #d95a1a);
  --egcc-bg: var(--bg-card, #ffffff);
  --egcc-text: var(--text-primary, #0f172a);
  --egcc-muted: var(--text-secondary, #475569);
  --egcc-border: var(--border, #e2e8f0);
  --egcc-subtle: var(--bg-subtle, #f8fafc);
}
html.dark {
  --egcc-bg: var(--bg-card, #1a2235);
  --egcc-text: var(--text-primary, #f1f5f9);
  --egcc-muted: var(--text-secondary, #94a3b8);
  --egcc-border: var(--border, #1e293b);
  --egcc-subtle: var(--bg-subtle, #111827);
}

.egcc-banner, .egcc-modal { font-family: inherit; line-height: 1.55; box-sizing: border-box; }
.egcc-banner *, .egcc-modal * { box-sizing: border-box; }

/* Paziņojums */
.egcc-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 99998;
  max-width: 1168px; margin: 0 auto;
  background: var(--egcc-bg); color: var(--egcc-text);
  border: 1px solid var(--egcc-border); border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  animation: egcc-in 0.35s ease-out;
}
html.dark .egcc-banner { box-shadow: 0 12px 48px rgba(0,0,0,0.5); }
@keyframes egcc-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.egcc-inner { display: flex; align-items: center; gap: 2rem; padding: 1.25rem 1.5rem; }
.egcc-copy { flex: 1; min-width: 0; }
.egcc-title { margin: 0 0 0.25rem; font-size: 1rem; font-weight: 800; color: var(--egcc-text); }
.egcc-text { margin: 0; font-size: 0.875rem; color: var(--egcc-muted); }
.egcc-link { color: var(--egcc-primary); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

/* Vienādas pogas */
.egcc-actions { display: flex; gap: 0.625rem; flex-shrink: 0; }
.egcc-btn {
  flex: 1 1 0; min-width: 150px; white-space: nowrap;
  padding: 0.7rem 1.1rem; border: 2px solid var(--egcc-primary); border-radius: 8px;
  background: var(--egcc-primary); color: #fff;
  font: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1.2; text-align: center;
  cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.egcc-btn:hover { background: var(--egcc-primary-hover); border-color: var(--egcc-primary-hover); transform: translateY(-1px); }
.egcc-btn:focus-visible, .egcc-x:focus-visible, .egcc-switch input:focus-visible + span { outline: 2px solid var(--egcc-primary); outline-offset: 2px; }

/* Iestatījumu logs */
html.egcc-lock { overflow: hidden; }
.egcc-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.egcc-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,0.55); }
.egcc-dialog {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--egcc-bg); color: var(--egcc-text);
  border: 1px solid var(--egcc-border); border-radius: 16px; padding: 1.75rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3); outline: none;
}
.egcc-dialog .egcc-title { font-size: 1.15rem; margin-bottom: 0.4rem; padding-right: 2rem; }
.egcc-dialog > .egcc-text { margin-bottom: 1.25rem; }
.egcc-x {
  position: absolute; top: 0.9rem; right: 0.9rem; width: 34px; height: 34px;
  border: 1px solid var(--egcc-border); border-radius: 8px; background: transparent;
  color: var(--egcc-muted); font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.egcc-x:hover { color: var(--egcc-primary); border-color: var(--egcc-primary); }
.egcc-cat { padding: 0.95rem 1rem; border: 1px solid var(--egcc-border); border-radius: 12px; background: var(--egcc-subtle); margin-bottom: 0.65rem; }
.egcc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.egcc-cat-title { font-weight: 700; font-size: 0.9375rem; }
.egcc-cat-text { margin: 0.35rem 0 0; font-size: 0.8125rem; color: var(--egcc-muted); }
.egcc-always { font-size: 0.75rem; font-weight: 700; color: var(--egcc-primary); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.egcc-actions-modal { margin-top: 1.25rem; }

/* Slēdzis */
.egcc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.egcc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.egcc-switch span { position: absolute; inset: 0; border-radius: 24px; background: #cbd5e1; transition: background 0.2s; pointer-events: none; }
html.dark .egcc-switch span { background: #334155; }
.egcc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.egcc-switch input:checked + span { background: var(--egcc-primary); }
.egcc-switch input:checked + span::after { transform: translateX(20px); }

/* Mobilais */
@media (max-width: 860px) {
  .egcc-inner { flex-direction: column; align-items: stretch; gap: 1rem; }
}
@media (max-width: 520px) {
  .egcc-banner { left: 8px; right: 8px; bottom: 8px; }
  .egcc-inner { padding: 1rem; }
  .egcc-actions { flex-direction: column; }
  .egcc-btn { min-width: 0; width: 100%; white-space: normal; }
  .egcc-dialog { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { .egcc-banner { animation: none; } .egcc-btn:hover { transform: none; } }
@media print { .egcc-banner, .egcc-modal { display: none !important; } }
