/* =============================================
   Cookie Consent – GREF
   ============================================= */

/* Banner */
.cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1a1a2e;
  color: #e0e0e0;
  padding: 1.25rem 1.5rem;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
  display: none;
  animation: cc-slide-up 0.4s ease;
}

.cc-banner.cc-visible {
  display: block;
}

@keyframes cc-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.cc-banner-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cc-banner-text {
  flex: 1;
  min-width: 280px;
}

.cc-banner-text a {
  color: #7eb8f7;
  text-decoration: underline;
}

.cc-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cc-btn {
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cc-btn-accept {
  background: #054d8d;
  color: #fff;
}

.cc-btn-accept:hover {
  background: #033661;
}

.cc-btn-reject {
  background: transparent;
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cc-btn-reject:hover {
  border-color: #fff;
  color: #fff;
}

.cc-btn-settings {
  background: transparent;
  color: #7eb8f7;
  border: none;
  text-decoration: underline;
  padding: 0.5rem 0.75rem;
}

.cc-btn-settings:hover {
  color: #fff;
}

/* Overlay preferencias */
.cc-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.cc-overlay.cc-visible {
  display: flex;
}

/* Modal preferencias */
.cc-modal {
  background: #fff;
  border-radius: 8px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: cc-fade-in 0.3s ease;
}

@keyframes cc-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.cc-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cc-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
}

.cc-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.cc-modal-close:hover {
  color: #333;
}

.cc-modal-body {
  padding: 1.5rem;
}

.cc-modal-body p {
  font-size: 14px;
  color: #666;
  margin-bottom: 1.25rem;
}

/* Categorías */
.cc-category {
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.cc-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cc-category-header strong {
  font-size: 14px;
  color: #333;
}

.cc-category-desc {
  font-size: 13px;
  color: #888;
  margin-top: 0.35rem;
  margin-bottom: 0;
}

/* Toggle switch */
.cc-toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

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

.cc-toggle-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ccc;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.3s;
}

.cc-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}

.cc-toggle input:checked + .cc-toggle-slider {
  background: #054d8d;
}

.cc-toggle input:checked + .cc-toggle-slider::before {
  transform: translateX(18px);
}

.cc-toggle input:disabled + .cc-toggle-slider {
  background: #054d8d;
  opacity: 0.6;
  cursor: not-allowed;
}

.cc-badge-required {
  font-size: 11px;
  color: #999;
  font-style: italic;
}

/* Footer modal */
.cc-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.cc-btn-save {
  background: #054d8d;
  color: #fff;
}

.cc-btn-save:hover {
  background: #033661;
}

.cc-btn-accept-all {
  background: #054d8d;
  color: #fff;
}

.cc-btn-accept-all:hover {
  background: #033661;
}

/* Responsive */
@media (max-width: 575.98px) {
  .cc-banner-inner {
    flex-direction: column;
    text-align: center;
  }
  .cc-banner-actions {
    justify-content: center;
    width: 100%;
  }
  .cc-btn {
    flex: 1;
    min-width: 0;
  }
}
