/* ══════════════════════════════════════════════
   OneConcord AI — Cookie Consent Banner
   Brand-matched: Charcoal Teal / Mint Green / Gold
   GDPR (EU) · CCPA (USA) · Global Compliant
   ══════════════════════════════════════════════ */

/* ── Banner Overlay ── */
#cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 24, 37, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 99998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#cc-overlay.cc-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Main Banner ── */
#cc-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 40px));
  width: min(800px, calc(100vw - 32px));
  z-index: 99999;
  font-family: 'Manrope', system-ui, sans-serif;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
}

#cc-banner.cc-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ── Banner Card ── */
.cc-card {
  background: rgba(4, 47, 52, 0.94);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(181, 242, 219, 0.18);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow:
    0 0 0 1px rgba(181, 242, 219, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.55),
    0 32px 80px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(181, 242, 219, 0.1);
  position: relative;
  overflow: hidden;
}

/* Glow accent top-left */
.cc-card::before {
  content: '';
  position: absolute;
  top: -80px;
  left: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(181, 242, 219, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Banner Top Row ── */
.cc-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.cc-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(181, 242, 219, 0.08);
  border: 1px solid rgba(181, 242, 219, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B5F2DB;
  margin-top: 2px;
}

.cc-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cc-title-group { flex: 1; }

.cc-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cc-region-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(255, 201, 51, 0.12);
  border: 1px solid rgba(255, 201, 51, 0.3);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFC933;
}

.cc-subtitle {
  font-size: 0.8rem;
  color: rgba(228, 238, 240, 0.65);
  margin: 0;
  line-height: 1.5;
}

/* ── Cookie Categories ── */
.cc-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 18px;
}

.cc-category {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(181, 242, 219, 0.1);
  border-radius: 10px;
  padding: 11px 13px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.cc-category:hover {
  border-color: rgba(181, 242, 219, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.cc-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.cc-cat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #E4EEF0;
}

/* ── Toggle Switch ── */
.cc-toggle {
  position: relative;
  width: 32px;
  height: 17px;
  flex-shrink: 0;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cc-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.cc-toggle input:checked + .cc-toggle-track {
  background: rgba(181, 242, 219, 0.22);
  border-color: #B5F2DB;
}

.cc-toggle-thumb {
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: transform 0.25s ease, background 0.25s ease;
  pointer-events: none;
}

.cc-toggle input:checked ~ .cc-toggle-thumb {
  transform: translateX(15px);
  background: #B5F2DB;
}

/* Locked (required) */
.cc-toggle.cc-locked .cc-toggle-track {
  background: rgba(181, 242, 219, 0.15);
  border-color: rgba(181, 242, 219, 0.35);
  cursor: not-allowed;
  opacity: 0.75;
}

.cc-toggle.cc-locked .cc-toggle-thumb {
  transform: translateX(15px);
  background: #B5F2DB;
}

.cc-cat-desc {
  font-size: 0.66rem;
  color: rgba(228, 238, 240, 0.5);
  line-height: 1.4;
  margin: 0;
}

/* ── Actions Row ── */
.cc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 8px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.22s ease;
  white-space: nowrap;
}

/* Accept All — Gold (primary CTA) */
.cc-btn-accept {
  background: #FFC933;
  color: #16232B;
  border: 1.5px solid #FFC933;
  flex: 1;
  min-width: 140px;
}

.cc-btn-accept:hover {
  background: #ffd455;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 201, 51, 0.4);
}

/* Necessary Only — Mint outline */
.cc-btn-necessary {
  background: transparent;
  color: #B5F2DB;
  border: 1.5px solid rgba(181, 242, 219, 0.35);
  flex: 1;
  min-width: 140px;
}

.cc-btn-necessary:hover {
  border-color: #B5F2DB;
  background: rgba(181, 242, 219, 0.06);
  transform: translateY(-1px);
}

/* Customize — Ghost */
.cc-btn-custom {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(228, 238, 240, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  padding: 9px 14px;
}

.cc-btn-custom:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #E4EEF0;
  transform: translateY(-1px);
}

/* ── Footer Links ── */
.cc-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(181, 242, 219, 0.07);
}

.cc-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cc-link {
  font-size: 0.7rem;
  color: rgba(228, 238, 240, 0.45);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  font-family: 'Manrope', system-ui, sans-serif;
  padding: 0;
}

.cc-link:hover { color: #B5F2DB; }

.cc-powered {
  font-size: 0.64rem;
  color: rgba(228, 238, 240, 0.28);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cc-powered span { color: #B5F2DB; font-weight: 700; }

/* ── Preference Center Modal ── */
#cc-prefs {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(14, 24, 37, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#cc-prefs.cc-visible {
  opacity: 1;
  pointer-events: auto;
}

.cc-prefs-card {
  background: #0e1e27;
  border: 1px solid rgba(181, 242, 219, 0.18);
  border-radius: 16px;
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  scrollbar-width: thin;
  scrollbar-color: rgba(181, 242, 219, 0.2) transparent;
}

.cc-prefs-card::-webkit-scrollbar { width: 5px; }
.cc-prefs-card::-webkit-scrollbar-track { background: transparent; }
.cc-prefs-card::-webkit-scrollbar-thumb {
  background: rgba(181, 242, 219, 0.2);
  border-radius: 99px;
}

.cc-prefs-header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(181, 242, 219, 0.1);
  position: sticky;
  top: 0;
  background: #0e1e27;
  z-index: 1;
}

.cc-prefs-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.cc-prefs-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
}

.cc-prefs-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(228,238,240,0.6);
  flex-shrink: 0;
  transition: all 0.2s;
}

.cc-prefs-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.cc-prefs-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.cc-prefs-subtitle {
  font-size: 0.8rem;
  color: rgba(228, 238, 240, 0.55);
  margin: 0;
  line-height: 1.5;
}

.cc-prefs-body {
  padding: 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cc-pref-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(181, 242, 219, 0.1);
  border-radius: 10px;
  padding: 16px 18px;
  transition: border-color 0.25s;
}

.cc-pref-item:hover { border-color: rgba(181, 242, 219, 0.2); }

.cc-pref-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cc-pref-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cc-required-badge {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B5F2DB;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(181, 242, 219, 0.1);
  border: 1px solid rgba(181, 242, 219, 0.25);
}

.cc-pref-item-desc {
  font-size: 0.77rem;
  color: rgba(228, 238, 240, 0.55);
  line-height: 1.55;
  margin: 0;
}

.cc-prefs-footer {
  padding: 18px 28px 24px;
  border-top: 1px solid rgba(181, 242, 219, 0.1);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Re-open floating button ── */
#cc-reopen {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 99997;
  background: rgba(4, 47, 52, 0.92);
  border: 1px solid rgba(181, 242, 219, 0.2);
  border-radius: 10px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(228, 238, 240, 0.5);
  cursor: pointer;
  transition: all 0.25s ease;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#cc-reopen.cc-visible {
  opacity: 1;
  pointer-events: auto;
}

#cc-reopen:hover {
  border-color: #B5F2DB;
  color: #B5F2DB;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(181, 242, 219, 0.12);
}

#cc-reopen svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  #cc-banner { bottom: 82px; }

  .cc-card { padding: 18px 16px; }

  .cc-categories {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .cc-actions { gap: 8px; }

  .cc-btn-accept,
  .cc-btn-necessary { min-width: 0; }

  .cc-footer { flex-direction: column; align-items: flex-start; }

  #cc-reopen { bottom: 88px; }
}

@media (max-width: 480px) {
  .cc-categories { grid-template-columns: 1fr; }

  .cc-category {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .cc-cat-header { margin-bottom: 0; flex-shrink: 0; }

  .cc-cat-desc { display: none; }

  .cc-actions { flex-direction: column; }

  .cc-btn { width: 100%; }

  .cc-prefs-body { padding: 16px 18px; }
  .cc-prefs-header { padding: 18px 18px 16px; }
  .cc-prefs-footer { padding: 16px 18px 20px; }
}
