/* ===== Sīkdatņu piekrišanas logs (Cookie consent) ===== */
.cc-banner,
.cc-modal {
  font-family: 'Poppins', sans-serif;
  color: #333;
  box-sizing: border-box;
}
.cc-banner *,
.cc-modal * { box-sizing: border-box; }

.cc-banner {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: min(440px, calc(100vw - 40px));
  background: #faf7f2;
  border: 1px solid #e6ded2;
  border-top: 4px solid #f7941d;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  padding: 20px 22px 18px;
  z-index: 1001;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .35s ease, transform .35s ease;
}
.cc-banner.cc-visible {
  opacity: 1;
  transform: translateY(0);
}
.cc-banner[hidden],
.cc-modal[hidden] { display: none !important; }

.cc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #222;
}
.cc-title svg { width: 22px; height: 22px; flex: none; }

.cc-text {
  margin: 0 0 14px;
  font-size: .88rem;
  line-height: 1.5;
  color: #555;
}
.cc-text a {
  color: #e07f0a;
  text-decoration: underline;
}

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cc-btn {
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid #f7941d;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
  line-height: 1.2;
}
.cc-btn:focus-visible { outline: 3px solid rgba(247,148,29,.45); outline-offset: 2px; }
.cc-btn:active { transform: scale(.97); }
.cc-btn-accept {
  background: #f7941d;
  color: #fff;
  flex: 1 1 auto;
}
.cc-btn-accept:hover { background: #e07f0a; border-color: #e07f0a; }
.cc-btn-reject {
  background: transparent;
  color: #e07f0a;
}
.cc-btn-reject:hover { background: rgba(247,148,29,.12); }
.cc-btn-settings {
  background: transparent;
  color: #555;
  border-color: #ddd;
}
.cc-btn-settings:hover { border-color: #aaa; color: #222; }

/* ----- Iestatījumu logs ----- */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(34, 24, 10, .55);
  backdrop-filter: blur(2px);
}
.cc-dialog {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
  border-top: 5px solid #f7941d;
}
.cc-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 10px;
}
.cc-dialog-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #222;
}
.cc-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.cc-close:hover { color: #222; background: #f5f5f5; }
.cc-dialog-body { padding: 0 22px 10px; }
.cc-dialog-body > p {
  font-size: .88rem;
  color: #555;
  line-height: 1.5;
  margin: 0 0 14px;
}

.cc-cat {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid #eee;
}
.cc-cat-info { flex: 1; }
.cc-cat-info strong {
  display: block;
  font-size: .95rem;
  color: #222;
  margin-bottom: 3px;
}
.cc-cat-info span {
  font-size: .82rem;
  color: #555;
  line-height: 1.45;
}
.cc-cat-always {
  font-size: .78rem;
  font-weight: 600;
  color: #4caf50;
  white-space: nowrap;
  padding-top: 4px;
}

/* slēdzis */
.cc-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex: none;
  margin-top: 2px;
}
.cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cc-slider {
  position: absolute;
  inset: 0;
  background: #ddd;
  border-radius: 26px;
  cursor: pointer;
  transition: background .2s;
}
.cc-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.cc-switch input:checked + .cc-slider { background: #f7941d; }
.cc-switch input:checked + .cc-slider::before { transform: translateX(20px); }
.cc-switch input:focus-visible + .cc-slider { outline: 3px solid rgba(247,148,29,.45); }

.cc-dialog-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 22px 20px;
  border-top: 1px solid #eee;
}
.cc-dialog-foot .cc-btn-accept { flex: 1 1 100%; }

/* poga kājenē, lai mainītu izvēli vēlāk */
.cc-reopen {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 600px) {
  .cc-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    padding: 16px 16px 14px;
  }
  .cc-actions .cc-btn { flex: 1 1 100%; text-align: center; }
  /* kamēr redzams sīkdatņu logs, paslēpt tērzēšanas pogu, lai nepārklājas */
  body:has(.cc-banner.cc-visible) .chat-widget { display: none; }
  .cc-dialog-head, .cc-dialog-body, .cc-dialog-foot { padding-left: 16px; padding-right: 16px; }
}