/* ===== Cookie Consent — Al-Waliy Sejahtera ===== */
:root {
  --cc-green: #1b4332;
  --cc-green-dark: #12301f;
  --cc-gold: #d4af6a;
  --cc-cream: #f7f4ee;
  --cc-text: #eef2ee;
}

/* --- Banner: kartu compact, sudut membulat rapi, aksen gold tipis di atas --- */
#cc-banner {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 9999;
  max-width: 340px;
  width: calc(100% - 36px);
  background: var(--cc-green);
  color: var(--cc-text);
  font-family: "Inter", sans-serif;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  overflow: hidden;
  padding: 18px 18px 16px;
  transform: translateY(calc(100% + 24px));
  opacity: 0;
  transition:
    transform 0.4s cubic-bezier(0.22, 0.9, 0.3, 1),
    opacity 0.4s ease;
}
#cc-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--cc-gold) 0%,
    #f3dba0 50%,
    var(--cc-gold) 100%
  );
}
#cc-banner.cc-show {
  transform: translateY(0);
  opacity: 1;
}

.cc-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cc-text strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cc-gold);
  display: block;
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}
.cc-text p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #d9e2dc;
}
.cc-text a {
  color: var(--cc-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cc-btn {
  border: none;
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  letter-spacing: 0.01em;
  transition:
    background 0.2s,
    border-color 0.2s,
    opacity 0.2s;
  white-space: nowrap;
}
.cc-btn:hover {
  opacity: 0.9;
}
.cc-btn-accept {
  background: var(--cc-gold);
  color: var(--cc-green-dark);
  flex: 1 1 auto;
}
.cc-btn-accept:hover {
  background: #e0bd80;
  opacity: 1;
}
.cc-btn-reject {
  background: transparent;
  color: var(--cc-text);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.cc-btn-reject:hover {
  border-color: rgba(255, 255, 255, 0.4);
  opacity: 1;
}
.cc-btn-settings {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cc-text);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.cc-btn-settings:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

@media (max-width: 480px) {
  #cc-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: none;
  }
}

/* --- Settings Modal --- */
#cc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 15, 0.5);
  backdrop-filter: blur(2px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#cc-modal-overlay.cc-show {
  display: flex;
}

#cc-modal {
  background: var(--cc-cream);
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 24px;
  font-family: "Inter", sans-serif;
  border-top: 3px solid var(--cc-gold);
}
#cc-modal h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--cc-green);
  margin: 6px 0 6px;
}
#cc-modal > p {
  font-size: 0.8rem;
  color: #6b7a70;
  margin: 0 0 18px;
  line-height: 1.5;
}

.cc-category {
  border-top: 1px solid #e2ddd0;
  padding: 14px 0;
}
.cc-category:last-of-type {
  border-bottom: 1px solid #e2ddd0;
  margin-bottom: 18px;
}
.cc-cat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.cc-cat-head strong {
  color: var(--cc-green-dark);
  font-size: 0.88rem;
  font-weight: 700;
}
.cc-cat-head p {
  margin: 5px 0 0;
  font-size: 0.78rem;
  color: #6b7a70;
  line-height: 1.45;
}
.cc-locked {
  font-size: 0.65rem;
  color: #8a9a8f;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Toggle switch — sedikit lebih kecil & rapi */
.cc-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}
.cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cc-slider {
  position: absolute;
  inset: 0;
  background: #c9c2b0;
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
}
.cc-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.cc-switch input:checked + .cc-slider {
  background: var(--cc-green);
}
.cc-switch input:checked + .cc-slider::before {
  transform: translateX(16px);
}
.cc-switch input:disabled + .cc-slider {
  opacity: 0.55;
  cursor: not-allowed;
}

.cc-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.cc-modal-actions .cc-btn {
  padding: 8px 16px;
}

/* Small "Pengaturan Cookie" link for footer — konsisten sama .sf-bottom-link */
.cc-footer-link {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition: color 0.2s;
}
.cc-footer-link:hover {
  color: rgba(255, 255, 255, 0.55);
}
