/* Aviso de cookies y preferencias */
.gcg-consent {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 6000;

  display: none;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;

  border: 1px solid var(--gcg-border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--gcg-shadow-strong);
}

.gcg-consent.is-visible {
  display: block;
}

.gcg-consent-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.gcg-consent-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid rgba(6, 50, 71, 0.1);
  background: white;
}

.gcg-consent-copy h2 {
  color: var(--gcg-navy);
  font-size: 1rem;
  line-height: 1.2;
}

.gcg-consent-copy p {
  margin-top: 6px;
  color: var(--gcg-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.gcg-consent-copy a {
  color: var(--gcg-blue);
  font-weight: 900;
  text-decoration: none;
}

.gcg-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.gcg-consent-actions button,
.gcg-cookie-manage,
.gcg-consent-modal button {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(6, 50, 71, 0.14);
  font-weight: 900;
  font-size: 0.82rem;
  transition: var(--gcg-transition);
}

.gcg-consent-accept {
  color: white;
  background: linear-gradient(135deg, var(--gcg-navy), var(--gcg-blue));
}

.gcg-consent-reject,
.gcg-consent-settings {
  color: var(--gcg-navy);
  background: rgba(255, 255, 255, 0.76);
}

.gcg-cookie-manage {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 2500;

  display: none;
  color: var(--gcg-navy);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--gcg-shadow);
}

.gcg-cookie-manage.is-visible {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gcg-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 6100;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;
  background: rgba(3, 12, 28, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.gcg-consent-modal.is-visible {
  display: flex;
}

.gcg-consent-panel {
  width: min(620px, 94vw);
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--gcg-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--gcg-shadow-strong);
}

.gcg-consent-panel-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.gcg-consent-panel-header img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
}

.gcg-consent-panel h2 {
  color: var(--gcg-navy);
  font-size: 1.25rem;
}

.gcg-consent-panel p {
  color: var(--gcg-muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.gcg-consent-option {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(6, 50, 71, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.gcg-consent-option label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--gcg-navy);
  font-weight: 900;
}

.gcg-consent-option small {
  display: block;
  margin-top: 6px;
  color: var(--gcg-muted);
  line-height: 1.45;
}

.gcg-consent-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

@media (max-width: 768px) {
  .gcg-consent {
    bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .gcg-consent-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .gcg-consent-logo {
    margin: 0 auto;
  }

  .gcg-consent-actions {
    justify-content: center;
  }

  .gcg-cookie-manage {
    bottom: calc(90px + env(safe-area-inset-bottom));
    font-size: 0.74rem;
  }

  .gcg-consent-modal-actions {
    flex-direction: column;
  }

  .gcg-consent-modal-actions button {
    width: 100%;
  }
}

/* Ajuste discreto del botón permanente de cookies */
.gcg-cookie-manage {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 0.72rem;
  opacity: 0.72;
}

.gcg-cookie-manage:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* El control de cookies vive en el footer compacto del home */
#gcg-cookie-manage,
.gcg-cookie-manage {
  display: none !important;
}
