/* Consentimiento de cookies.
   Va en su propio fichero: main.css es de la plantilla y conviene no
   mezclarlo con lo que escribimos nosotros. Usa la paleta del sitio
   (--color-primary terracota, --color-secondary pizarra) y el beige de
   fondo de las secciones. */

.gp-cookies-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000; /* el z-index más alto de main.css es 9999 */
  background: rgba(48, 64, 73, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px;
}

.gp-cookies-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 18px 50px rgba(48, 64, 73, 0.28);
  font-family: var(--font-body, sans-serif);
}

.gp-cookies-titulo {
  font-family: var(--font-heading, serif);
  font-size: 26px;
  line-height: 1.2;
  color: var(--color-heading, #304049);
  margin: 0 0 12px;
  text-transform: none;
}

.gp-cookies-texto {
  font-size: 15px;
  line-height: 24px;
  color: var(--color-default, #304049);
  margin: 0 0 20px;
}

/* Los dos botones de decisión tienen el mismo peso visual a propósito:
   rechazar debe costar lo mismo que aceptar. */
.gp-cookies-btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 14px 20px;
  font-family: var(--font-body, sans-serif);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.25s;
  margin-bottom: 10px;
}

.gp-cookies-btn--principal {
  background: var(--color-primary, #b0612b);
  color: #fff;
}

.gp-cookies-btn--principal:hover {
  background: var(--color-secondary, #304049);
}

.gp-cookies-btn--secundario {
  background: var(--gp-beige, #f3ebd6);
  color: var(--color-secondary, #304049);
}

.gp-cookies-btn--secundario:hover {
  background: #e7dcc0;
}

.gp-cookies-pie {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: center;
  margin-top: 14px;
}

.gp-cookies-enlace {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body, sans-serif);
  font-size: 14px;
  color: var(--color-secondary, #304049);
  text-decoration: underline;
  cursor: pointer;
}

.gp-cookies-enlace:hover {
  color: var(--color-primary, #b0612b);
}

/* Panel de preferencias */

.gp-cookies-grupo {
  border-top: 1px solid var(--color-border, #cbcad3);
  padding: 16px 0;
}

.gp-cookies-grupo-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
  color: var(--color-heading, #304049);
  font-size: 15px;
}

.gp-cookies-grupo-texto {
  font-size: 14px;
  line-height: 22px;
  color: var(--color-default, #304049);
  opacity: 0.85;
  margin: 0;
}

.gp-cookies-siempre {
  font-size: 13px;
  color: var(--color-primary, #b0612b);
  white-space: nowrap;
}

.gp-cookies-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.gp-cookies-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.gp-cookies-switch span {
  position: absolute;
  inset: 0;
  background: var(--color-border, #cbcad3);
  border-radius: 24px;
  transition: 0.25s;
  cursor: pointer;
}

.gp-cookies-switch span::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.25s;
}

.gp-cookies-switch input:checked + span {
  background: var(--color-primary, #b0612b);
}

.gp-cookies-switch input:checked + span::before {
  transform: translateX(20px);
}

.gp-cookies-switch input:focus-visible + span {
  outline: 2px solid var(--color-secondary, #304049);
  outline-offset: 2px;
}

@media (max-width: 575px) {
  .gp-cookies-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .gp-cookies-card {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px;
    max-height: 88vh;
  }

  .gp-cookies-titulo {
    font-size: 22px;
  }
}
