@charset "UTF-8";

/* ==========================================================================
   Sistema de Consentimiento de Cookies - Cooperativa de Viviendas Comahue Ltda.
   Usa las mismas variables de color que public/css/styles.css para integrarse
   visualmente con el resto del sitio (verde institucional Comahue).
   ========================================================================== */

:root {
  --cc-radius-lg: 20px;
  --cc-radius-md: 14px;
  --cc-radius-sm: 10px;
  --cc-shadow-banner: 0 -8px 40px -8px rgba(3, 53, 28, 0.22), 0 4px 24px rgba(3, 53, 28, 0.08);
  --cc-shadow-modal: 0 24px 70px -12px rgba(3, 53, 28, 0.35);
  --cc-overlay: rgba(3, 20, 12, 0.55);
  --cc-border: rgba(3, 53, 28, 0.1);
  --cc-track-off: #cbd5e1;
}

/* -------------------------------------------------------------------- */
/* Utilidades comunes                                                    */
/* -------------------------------------------------------------------- */
.cc-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------------------------- */
/* Banner inferior                                                       */
/* -------------------------------------------------------------------- */
.cc-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 9998;
  display: flex;
  justify-content: center;
  padding: 0 16px 16px;
  pointer-events: none;
}

.cc-banner__card {
  pointer-events: auto;
  width: 100%;
  max-width: 1080px;
  margin-bottom: 12px;
  background: var(--color-white, #fff);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-lg);
  box-shadow: var(--cc-shadow-banner);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  animation: cc-slide-up 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.cc-banner__icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(10, 90, 50, 0.08);
  color: var(--color-primary, #0a5a32);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-banner__icon svg {
  width: 24px;
  height: 24px;
}

.cc-banner__body {
  flex: 1 1 320px;
  min-width: 0;
}

.cc-banner__title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--color-primary-dark, #03351c);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.cc-banner__text {
  font-size: 0.83rem;
  line-height: 1.5;
  color: #4b5a52;
  margin: 0;
}

.cc-banner__links {
  margin-top: 6px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.cc-banner__links a,
.cc-modal__links a {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary, #0a5a32);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-banner__links a:hover,
.cc-modal__links a:hover {
  color: var(--color-primary-dark, #03351c);
}

.cc-banner__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* -------------------------------------------------------------------- */
/* Botones                                                                */
/* -------------------------------------------------------------------- */
.cc-btn {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.cc-btn:active {
  transform: scale(0.97);
}

.cc-btn:focus-visible {
  outline: 3px solid rgba(10, 90, 50, 0.35);
  outline-offset: 2px;
}

.cc-btn-primary {
  background: var(--color-primary, #0a5a32);
  color: #fff;
}

.cc-btn-primary:hover {
  background: var(--color-primary-dark, #03351c);
  box-shadow: 0 4px 12px rgba(10, 90, 50, 0.28);
}

.cc-btn-outline {
  background: transparent;
  border-color: var(--cc-border);
  color: var(--color-primary-dark, #03351c);
}

.cc-btn-outline:hover {
  background: rgba(10, 90, 50, 0.06);
  border-color: var(--color-primary, #0a5a32);
}

.cc-btn-ghost {
  background: transparent;
  color: #5b6b62;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding-left: 8px;
  padding-right: 8px;
}

.cc-btn-ghost:hover {
  color: var(--color-primary-dark, #03351c);
}

/* -------------------------------------------------------------------- */
/* Overlay + Modal de preferencias                                       */
/* -------------------------------------------------------------------- */
.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--cc-overlay);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: cc-fade-in 0.25s ease;
}

.cc-modal {
  width: 100%;
  max-width: 660px;
  max-height: min(720px, 92vh);
  background: var(--color-white, #fff);
  border-radius: 24px;
  box-shadow: var(--cc-shadow-modal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cc-scale-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cc-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--cc-border);
  flex-shrink: 0;
}

.cc-modal__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-primary-dark, #03351c);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.cc-modal__intro {
  font-size: 0.82rem;
  color: #5b6b62;
  margin: 0;
  line-height: 1.5;
}

.cc-modal__close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: rgba(3, 53, 28, 0.06);
  color: var(--color-primary-dark, #03351c);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.cc-modal__close:hover {
  background: rgba(3, 53, 28, 0.12);
}

.cc-modal__close:focus-visible {
  outline: 3px solid rgba(10, 90, 50, 0.35);
  outline-offset: 2px;
}

.cc-modal__body {
  overflow-y: auto;
  padding: 8px 24px;
  flex: 1 1 auto;
}

.cc-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--cc-border);
}

.cc-category:last-child {
  border-bottom: none;
}

.cc-category__text {
  min-width: 0;
}

.cc-category__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-primary-dark, #03351c);
  margin: 0 0 3px;
}

.cc-category__badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary, #0a5a32);
  background: rgba(10, 90, 50, 0.08);
  padding: 2px 8px;
  border-radius: 999px;
}

.cc-category__desc {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #5b6b62;
  margin: 0;
}

/* -------------------------------------------------------------------- */
/* Switch (toggle)                                                        */
/* -------------------------------------------------------------------- */
.cc-switch {
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 26px;
}

.cc-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.cc-switch__track {
  position: absolute;
  inset: 0;
  background: var(--cc-track-off);
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.cc-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cc-switch input:checked ~ .cc-switch__track {
  background: var(--color-primary, #0a5a32);
}

.cc-switch input:checked ~ .cc-switch__thumb {
  transform: translateX(20px);
}

.cc-switch input:disabled {
  cursor: not-allowed;
}

.cc-switch input:disabled ~ .cc-switch__track {
  background: var(--color-primary-light, #15803d);
  opacity: 0.55;
}

.cc-switch input:focus-visible ~ .cc-switch__track {
  outline: 3px solid rgba(10, 90, 50, 0.35);
  outline-offset: 2px;
}

.cc-modal__footer {
  flex-shrink: 0;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--cc-border);
}

.cc-modal__footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cc-modal__links {
  margin-top: 14px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------------- */
/* Botón flotante de preferencias (una vez que ya hay consentimiento)    */
/* -------------------------------------------------------------------- */
.cc-float-btn {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 9997;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary-dark, #03351c);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(3, 53, 28, 0.35);
  transition: transform 0.15s ease, background-color 0.15s ease;
  opacity: 0.9;
}

.cc-float-btn:hover {
  background: var(--color-primary, #0a5a32);
  transform: translateY(-2px);
  opacity: 1;
}

.cc-float-btn:focus-visible {
  outline: 3px solid rgba(10, 90, 50, 0.35);
  outline-offset: 2px;
}

.cc-float-btn svg {
  width: 20px;
  height: 20px;
}

/* -------------------------------------------------------------------- */
/* Animaciones                                                           */
/* -------------------------------------------------------------------- */
@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) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner__card,
  .cc-overlay,
  .cc-modal,
  .cc-switch__thumb,
  .cc-float-btn,
  .cc-btn {
    animation: none !important;
    transition: none !important;
  }
}

/* -------------------------------------------------------------------- */
/* Responsive                                                            */
/* -------------------------------------------------------------------- */
@media (max-width: 640px) {
  .cc-banner {
    padding: 0 10px 10px;
  }

  .cc-banner__card {
    padding: 18px;
    border-radius: var(--cc-radius-md);
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .cc-banner__icon {
    display: none;
  }

  .cc-banner__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cc-banner__actions .cc-btn {
    width: 100%;
    text-align: center;
    padding: 12px 18px;
  }

  .cc-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .cc-modal {
    max-width: 100%;
    max-height: 92vh;
    width: 100%;
    border-radius: 22px 22px 0 0;
    animation: cc-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .cc-modal__footer-actions {
    flex-direction: column;
  }

  .cc-modal__footer-actions .cc-btn {
    width: 100%;
    text-align: center;
  }

  .cc-float-btn {
    left: 14px;
    bottom: 14px;
  }
}
