/* Cookie Consent — Siledaks.ee (Ultra-compact, Professional) */
:root {
  --cc-bg: #0a0a0c;
  --cc-surface: rgba(255, 255, 255, 0.04);
  --cc-surface-hover: rgba(255, 255, 255, 0.07);
  --cc-border: rgba(255, 255, 255, 0.08);
  --cc-text: #fff;
  --cc-text-secondary: rgba(255, 255, 255, 0.6);
  --cc-accent: #00d4ff;
  --cc-accent-soft: rgba(0, 212, 255, 0.12);
  --cc-success: #22c55e;
  --cc-font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════
   CONTAINER
═══════════════════════════════════════════════════════════════ */
#cc-root {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9999;
  font-family: var(--cc-font);
  -webkit-font-smoothing: antialiased;
}

#cc-banner {
  width: 380px;
  max-width: calc(100vw - 32px);
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  border-radius: 12px;
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 20px 50px -12px rgba(0, 0, 0, 0.6),
    0 8px 20px -8px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: cc-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cc-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT (Collapsed State)
═══════════════════════════════════════════════════════════════ */
.cc-inner {
  padding: 20px;
}

.cc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--cc-text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.cc-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--cc-text-secondary);
  margin: 0 0 16px;
}

.cc-text a {
  color: var(--cc-text);
  text-decoration: none;
  transition: opacity 0.15s;
}

.cc-text a:hover {
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
.cc-actions {
  display: flex;
  gap: 8px;
}

.cc-btn {
  flex: 1;
  height: 38px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cc-text-secondary);
}

.cc-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cc-text);
}

.cc-btn--outline {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cc-text);
}

.cc-btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.cc-btn--primary {
  background: #fff;
  color: #000;
  font-weight: 600;
}

.cc-btn--primary:hover {
  background: rgba(255, 255, 255, 0.92);
}

.cc-btn:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS PANEL (Expanded State)
═══════════════════════════════════════════════════════════════ */
.cc-settings {
  display: none;
  border-top: 1px solid var(--cc-border);
  background: rgba(0, 0, 0, 0.2);
}

#cc-banner[data-open="1"] .cc-settings {
  display: block;
  animation: cc-fade-in 0.2s ease;
}

#cc-banner[data-open="1"] .cc-inner {
  display: none;
}

@keyframes cc-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cc-settings-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--cc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cc-settings-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--cc-text);
}

.cc-close-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cc-text-secondary);
  transition: all 0.15s;
}

.cc-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cc-text);
}

.cc-close-btn svg {
  width: 14px;
  height: 14px;
}

/* Cookie Categories */
.cc-categories {
  padding: 4px 20px 12px;
}

.cc-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.cc-category + .cc-category {
  border-top: 1px solid var(--cc-border);
}

.cc-category-info {
  flex: 1;
  min-width: 0;
}

.cc-category-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cc-text);
  margin-bottom: 3px;
}

.cc-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cc-text-secondary);
}

.cc-badge--required {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.cc-category-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--cc-text-secondary);
}

/* Toggle Switch */
.cc-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
  min-height: 0;
}

.cc-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cc-toggle[aria-checked="true"] {
  background: #22c55e;
}

.cc-toggle[aria-checked="true"]::after {
  left: 23px;
  background: #fff;
}

.cc-toggle[aria-disabled="true"] {
  cursor: not-allowed;
}

.cc-toggle[aria-disabled="true"][aria-checked="true"] {
  background: #22c55e;
  opacity: 1;
}

.cc-toggle:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}

/* Settings Actions */
.cc-settings-actions {
  padding: 4px 20px 20px;
  display: flex;
  gap: 8px;
}

.cc-settings-actions .cc-btn {
  flex: 1;
}

/* ═══════════════════════════════════════════════════════════════
   MINI FLOATING BUTTON
═══════════════════════════════════════════════════════════════ */
#cc-mini {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9998;
  width: 40px;
  height: 40px;
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  background: var(--cc-bg);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--cc-text-secondary);
  transition: all 0.2s ease;
  font-family: var(--cc-font);
  font-size: 0;
}

#cc-mini::before {
  content: '';
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--cc-accent), #4a7cff);
  border-radius: 4px;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
}

#cc-mini:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

#cc-mini:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 420px) {
  #cc-root {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
  
  #cc-banner {
    width: 100%;
  }
  
  #cc-mini {
    left: 8px;
    bottom: 8px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  #cc-banner,
  .cc-settings,
  .cc-btn,
  .cc-toggle,
  .cc-toggle::after,
  #cc-mini {
    animation: none;
    transition: none;
  }
}
