/* ============================================
   Cookie Consent Banner — Styles
   Drop this file in your /assets/css/ folder
   and link it in your shared header include.
   ============================================ */

#cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: #f26a21;
  color: #f2f3f5;
  padding: 20px 24px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: none;
}

#cc-banner.cc-visible {
  display: block;
  animation: cc-slide-up 0.3s ease-out;
}

@keyframes cc-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.cc-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cc-text {
  flex: 1 1 20px;
  font-size: 14px;
  line-height: 1.5;
}

.cc-text a {
  color: #000;
  text-decoration: underline;
}

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cc-btn {
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.cc-btn-accept {
  background: #84bd2a;
  color: #fff;
}

.cc-btn-reject {
  background: #000;
  color: #f2f3f5;
  border: 1px solid #4a5160;
}

.cc-btn-settings {
  background: transparent;
  color: #000;
  text-decoration: underline;
  padding: 10px 4px;
}

/* ---- Settings Modal ---- */

#cc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#cc-modal-overlay.cc-visible {
  display: flex;
}

#cc-modal {
  background: #fff;
  color: #1a1d23;
  border-radius: 10px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#cc-modal h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

#cc-modal p {
  font-size: 14px;
  line-height: 1.5;
  color: #4a4f57;
  margin: 0 0 20px;
}

.cc-category {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid #eceef1;
}

.cc-category:first-of-type {
  border-top: none;
}

.cc-category-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.cc-category-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

.cc-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d1d5db;
  border-radius: 24px;
  transition: 0.2s;
}

.cc-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

.cc-switch input:checked + .cc-slider {
  background: #2f6fed;
}

.cc-switch input:checked + .cc-slider::before {
  transform: translateX(18px);
}

.cc-switch input:disabled + .cc-slider {
  background: #9ca3af;
  cursor: not-allowed;
}

.cc-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.cc-modal-actions .cc-btn {
  flex: 1 1 auto;
}

@media (max-width: 600px) {
  .cc-inner { flex-direction: column; align-items: stretch; }
  .cc-actions { justify-content: stretch; }
  .cc-actions .cc-btn { flex: 1; }
}
