/*
 * Cookie Consent v1.0
 * GDPR-compliant cookie consent banner
 *
 * Culori de accent (Find & Replace pentru personalizare):
 *   #D4AF37  →  accent principal (butoane, link-uri, toggle ON, reopen)
 *   #c9a432  →  accent hover (butoane hover)
 *   #3B2F12  →  accent fundal inchis (tag "Intotdeauna active")
 *   #8B7025  →  accent disabled (toggle dezactivat)
 */

/* ===== RESET ===== */
.cc-banner,
.cc-banner *,
.cc-overlay,
.cc-overlay *,
.cc-reopen {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ===== BANNER ===== */
.cc-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 99998;
  width: 420px;
  max-width: calc(100vw - 32px);
  background: #111827;
  color: #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  padding: 24px;
  animation: cc-slide-up 0.4s ease-out;
}

.cc-banner-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.cc-banner-icon {
  font-size: 1.4rem;
  color: #D4AF37;
}

.cc-banner-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.cc-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #9ca3af;
  margin-bottom: 20px;
}

.cc-text a {
  color: #D4AF37;
  text-decoration: underline;
}

.cc-text a:hover {
  color: #fff;
}

/* ===== BUTTONS ===== */
.cc-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cc-btns-row {
  display: flex;
  gap: 8px;
}

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.cc-btn--accept {
  flex: 1;
  background: #D4AF37;
  color: #111;
}

.cc-btn--accept:hover {
  background: #c9a432;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.cc-btn--reject {
  flex: 1;
  background: transparent;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cc-btn--reject:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

.cc-btn--settings {
  width: 100%;
  background: transparent;
  color: #D4AF37;
  border: none;
  padding: 8px;
  font-size: 0.8rem;
}

.cc-btn--settings:hover {
  color: #fff;
}

/* ===== OVERLAY ===== */
.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: cc-fade-in 0.25s ease;
}

/* ===== MODAL ===== */
.cc-modal {
  background: #111827;
  color: #e5e7eb;
  border-radius: 16px;
  width: 540px;
  max-width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  animation: cc-scale-in 0.3s ease;
}

.cc-modal::-webkit-scrollbar {
  width: 6px;
}

.cc-modal::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 3px;
}

.cc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
}

.cc-modal-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cc-modal-icon {
  font-size: 1.2rem;
  color: #D4AF37;
}

.cc-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.cc-modal-close {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
  border-radius: 6px;
}

.cc-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.cc-modal-body {
  padding: 20px 24px;
}

.cc-modal-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #9ca3af;
  margin-bottom: 20px;
}

/* ===== CATEGORIES ===== */
.cc-category {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.cc-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 12px;
}

.cc-cat-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.cc-cat-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: #e5e7eb;
}

.cc-cat-tag--required {
  font-size: 0.65rem;
  font-weight: 700;
  background: #3B2F12;
  color: #D4AF37;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.cc-cat-desc {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.5;
  padding: 0 16px 14px;
}

/* ===== TOGGLE ===== */
.cc-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cc-toggle-slider {
  position: absolute;
  inset: 0;
  background: #374151;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.cc-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cc-toggle input:checked+.cc-toggle-slider {
  background: #D4AF37;
}

.cc-toggle input:checked+.cc-toggle-slider::after {
  transform: translateX(20px);
}

.cc-toggle input:disabled+.cc-toggle-slider {
  background: #8B7025;
  cursor: not-allowed;
  opacity: 0.65;
}

/* ===== MODAL FOOTER ===== */
.cc-modal-footer {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cc-btn--save {
  width: 100%;
  background: #D4AF37;
  color: #111;
  padding: 12px;
  font-size: 0.92rem;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.cc-btn--save:hover {
  background: #c9a432;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.cc-modal-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 0.78rem;
}

.cc-modal-links a {
  color: #D4AF37;
  text-decoration: none;
}

.cc-modal-links a:hover {
  text-decoration: underline;
  color: #fff;
}

/* ===== REOPEN BUTTON ===== */
.cc-reopen {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 99997;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #111827;
  color: #D4AF37;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.25s ease;
  animation: cc-fade-in 0.4s ease;
}

.cc-reopen:hover {
  background: #D4AF37;
  color: #111;
  border-color: #D4AF37;
  transform: scale(1.1);
}

/* ===== ANIMATIONS ===== */
@keyframes cc-slide-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cc-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes cc-scale-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== HIDDEN UTILITY ===== */
.cc-hidden {
  display: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .cc-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
    padding: 20px;
    border-radius: 12px;
  }

  .cc-btns-row {
    flex-direction: column;
  }

  .cc-modal {
    border-radius: 12px;
    max-height: 90vh;
  }

  .cc-modal-header,
  .cc-modal-body,
  .cc-modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cc-reopen {
    bottom: 10px;
    left: 10px;
  }
}