:root {
  --cc-bg: #111111;
  --cc-bg-modal: #161616;
  --cc-bg-row: #1a1a1a;
  --cc-orange: #f97316;
  --cc-orange-dk: rgba(249, 115, 22, 0.14);
  --cc-orange-br: rgba(249, 115, 22, 0.4);
  --cc-white: #ffffff;
  --cc-grey-1: #e5e7eb;
  --cc-grey-2: #9ca3af;
  --cc-grey-3: #6b7280;
  --cc-border: rgba(255, 255, 255, 0.08);
  --cc-border-h: rgba(255, 255, 255, 0.15);
  --cc-radius: 14px;
  --cc-z-banner: 900;
  --cc-z-modal: 1000;
}

/* ── WHATSAPP WIDGET ── */
.wa-fab {
  position: fixed;
  bottom: 1.8rem;
  right: 1.8rem;
  z-index: 200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  outline: none;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
  animation: waPulse 2.5s ease-in-out infinite;
}
.wa-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
  animation: none;
}
@keyframes waPulse {
  0%,
  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  }
  50% {
    box-shadow:
      0 4px 32px rgba(37, 211, 102, 0.75),
      0 0 0 10px rgba(37, 211, 102, 0.08);
  }
}

.wa-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--dark);
  font-size: 0.62rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--dark);
}

.wa-popup {
  position: fixed;
  bottom: 6rem;
  right: 1.8rem;
  z-index: 200;
  width: 320px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(16px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.25s;
}
.wa-popup.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* WA header */
.wa-header {
  background: #075e54;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.wa-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #128c7e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  overflow: hidden;
}
.wa-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wa-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}
.wa-status {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.1rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.wa-online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #25d366;
  display: inline-block;
}
.wa-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.2rem;
  line-height: 1;
  transition: color 0.2s;
}
.wa-close:hover {
  color: #fff;
}

/* WA chat body */
.wa-body {
  background: #ece5dd
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Ccircle cx='40' cy='40' r='38' fill='none' stroke='%23c8bfb7' stroke-width='.5'/%3E%3C/svg%3E")
    repeat;
  padding: 1rem 1rem 1.2rem;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.wa-bubble {
  background: #fff;
  border-radius: 0 8px 8px 8px;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
  color: #303030;
  line-height: 1.5;
  max-width: 85%;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.wa-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  left: -7px;
  border-width: 0 8px 8px 0;
  border-style: solid;
  border-color: transparent #fff transparent transparent;
}
.wa-time {
  font-size: 0.65rem;
  color: #888;
  margin-top: 0.3rem;
  text-align: right;
}

/* WA footer / input */
.wa-footer {
  background: #f0f0f0;
  padding: 0.65rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.wa-input {
  flex: 1;
  background: #fff;
  border: none;
  outline: none;
  border-radius: 20px;
  padding: 0.6rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #303030;
  resize: none;
  line-height: 1.4;
  max-height: 100px;
}
.wa-send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #25d366;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background 0.2s,
    transform 0.15s;
}
.wa-send:hover {
  background: #20b85a;
  transform: scale(1.08);
}
.wa-send svg {
  fill: #fff;
}

/* ── Banner ── */
#asar-cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: var(--cc-z-banner);
  width: calc(100% - 48px);
  max-width: 880px;
  background: var(--cc-bg);
  border: 1px solid var(--cc-border-h);
  border-radius: var(--cc-radius);
  padding: 20px 24px;
  opacity: 0;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

#asar-cookie-banner.cc-visible {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cc-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cc-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.cc-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  color: var(--cc-orange);
  margin-top: 2px;
}

.cc-icon svg {
  width: 100%;
  height: 100%;
}

.cc-text {
  min-width: 0;
}

.cc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--cc-white);
  margin: 0 0 4px;
  line-height: 1.3;
}

.cc-desc {
  font-size: 13px;
  color: var(--cc-grey-2);
  line-height: 1.6;
  margin: 0;
}

.cc-link {
  color: var(--cc-orange);
  text-decoration: none;
  transition: opacity 0.2s;
}

.cc-link:hover {
  opacity: 0.75;
}

/* ── Action buttons ── */
.cc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition:
    opacity 0.2s,
    background 0.2s,
    border-color 0.2s,
    transform 0.15s;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}

.cc-btn:hover {
  transform: translateY(-1px);
}
.cc-btn:active {
  transform: translateY(0);
}

.cc-btn--primary {
  background: var(--cc-orange);
  color: var(--cc-white);
}

.cc-btn--primary:hover {
  opacity: 0.88;
}

.cc-btn--outline {
  background: transparent;
  color: var(--cc-grey-1);
  border: 1px solid var(--cc-border-h);
}

.cc-btn--outline:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.cc-btn--ghost {
  background: transparent;
  color: var(--cc-grey-2);
  border: 1px solid transparent;
}

.cc-btn--ghost:hover {
  color: var(--cc-white);
  background: rgba(255, 255, 255, 0.05);
}

/* ── Modal backdrop ── */
#asar-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: var(--cc-z-modal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#asar-cookie-modal[hidden] {
  display: none;
}

.ccm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── Modal panel ── */
.ccm-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--cc-bg-modal);
  border: 1px solid var(--cc-border-h);
  border-radius: var(--cc-radius) var(--cc-radius) 0 0;
  padding: 28px 28px 32px;
  margin: 0;
  animation: ccm-slide-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ccm-slide-up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ccm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ccm-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--cc-white);
  margin: 0;
  letter-spacing: -0.01em;
}

.ccm-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--cc-grey-3);
  border-radius: 6px;
  transition:
    color 0.2s,
    background 0.2s;
  display: flex;
}

.ccm-close svg {
  width: 18px;
  height: 18px;
}

.ccm-close:hover {
  color: var(--cc-white);
  background: rgba(255, 255, 255, 0.07);
}

.ccm-intro {
  font-size: 13px;
  color: var(--cc-grey-2);
  line-height: 1.65;
  margin: 0 0 24px;
}

/* ── Category rows ── */
.ccm-categories {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 28px;
}

.ccm-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 18px;
  background: var(--cc-bg-row);
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.ccm-row:hover {
  border-color: var(--cc-border-h);
}

.ccm-info {
  flex: 1;
  min-width: 0;
}

.ccm-name {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--cc-white);
  margin-bottom: 6px;
  line-height: 1;
}

.ccm-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--cc-orange-dk);
  color: var(--cc-orange);
  border: 1px solid var(--cc-orange-br);
  border-radius: 20px;
  vertical-align: middle;
}

.ccm-detail {
  font-size: 12px;
  color: var(--cc-grey-3);
  line-height: 1.65;
  margin: 0;
}

/* ── Toggle switch ── */
.cc-toggle {
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
}

.cc-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.cc-track {
  display: block;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  position: relative;
  transition: background 0.25s;
  border: 1px solid var(--cc-border-h);
}

.cc-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--cc-grey-2);
  border-radius: 50%;
  transition:
    transform 0.25s,
    background 0.25s;
}

.cc-toggle input:checked + .cc-track {
  background: var(--cc-orange);
  border-color: var(--cc-orange-br);
}

.cc-toggle input:checked + .cc-track::after {
  transform: translateX(20px);
  background: var(--cc-white);
}

.cc-toggle input:focus-visible + .cc-track {
  outline: 2px solid var(--cc-orange);
  outline-offset: 2px;
}

.cc-toggle--locked {
  cursor: not-allowed;
  opacity: 0.5;
}

.cc-toggle--locked .cc-track {
  background: var(--cc-orange);
}
.cc-toggle--locked .cc-track::after {
  transform: translateX(20px);
  background: var(--cc-white);
}

/* ── Modal footer ── */
.ccm-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── FAB ── */
.cc-fab {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: var(--cc-z-banner);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cc-bg);
  border: 1px solid var(--cc-border-h);
  color: var(--cc-orange);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  font-family: inherit;
}

.cc-fab svg {
  width: 18px;
  height: 18px;
}

.cc-fab:hover {
  background: var(--cc-orange-dk);
  border-color: var(--cc-orange-br);
  transform: scale(1.08);
}

.cc-fab[hidden] {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  #asar-cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    transform: translateY(20px);
    border-radius: var(--cc-radius) var(--cc-radius) 0 0;
    border-bottom: none;
  }

  #asar-cookie-banner.cc-visible {
    transform: translateY(0);
  }

  .cc-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cc-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .cc-btn--ghost {
    display: none;
  }

  .ccm-panel {
    border-radius: var(--cc-radius) var(--cc-radius) 0 0;
    padding: 24px 20px 28px;
    max-height: 85vh;
  }

  .ccm-footer {
    flex-direction: column-reverse;
  }
  .ccm-footer .cc-btn {
    width: 100%;
  }
}