/* Aviso de cookies — "aviso de entrega" sobre papel. */
.mpc {
  --mpc-paper: #FFFDF7;
  --mpc-ink: #221D14;
  --mpc-soft: #5F5646;
  --mpc-line: rgba(34, 29, 20, .16);
  --mpc-kraft: #E0C7A0;
  --mpc-amber: #E85D04;
  --mpc-amber-deep: #B84803;
  --mpc-teal: #14655A;
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 10000;
  max-width: 1180px;
  margin-inline: auto;
  font-family: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  color: var(--mpc-ink);
  line-height: 1.5;
}
.mpc[hidden] { display: none; }

.mpc__slip {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title actions"
    "text  actions"
    "prefs prefs";
  column-gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: 24px 30px 22px;
  background: var(--mpc-paper);
  border: 1.5px solid var(--mpc-ink);
  border-radius: 14px;
  box-shadow: 0 2px 4px rgba(34, 29, 20, .06), 0 18px 44px rgba(34, 29, 20, .16);
  transform-origin: 50% 100%;
}
.mpc.is-entering .mpc__slip { animation: mpc-in 420ms cubic-bezier(0.23, 1, 0.32, 1) both; }
.mpc.is-leaving .mpc__slip { animation: mpc-out 200ms cubic-bezier(0.23, 1, 0.32, 1) both; }

@keyframes mpc-in {
  from { opacity: 0; transform: translateY(24px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes mpc-out {
  to { opacity: 0; transform: translateY(16px); }
}

.mpc__tape {
  position: absolute;
  top: -11px;
  left: 64px;
  width: 92px;
  height: 22px;
  translate: -50% 0;
  rotate: -2deg;
  background: var(--mpc-kraft);
  opacity: .92;
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 48%);
}
.mpc__stamp {
  position: absolute;
  top: -12px;
  right: 36px;
  margin: 0;
  padding: 3px 8px;
  background: var(--mpc-paper);
  border: 1.5px solid var(--mpc-teal);
  border-radius: 4px;
  color: var(--mpc-teal);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  rotate: 3deg;
}
.mpc__title {
  grid-area: title;
  margin: 0 0 6px;
  font: 500 1.42rem/1.12 "Fraunces", Georgia, serif;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.mpc__title em { color: var(--mpc-amber-deep); font-style: italic; }
.mpc__text { grid-area: text; max-width: 78ch; margin: 0; color: var(--mpc-soft); font-size: .9rem; }
.mpc__text a {
  color: var(--mpc-ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--mpc-amber);
  text-underline-offset: 3px;
}

.mpc__prefs {
  grid-area: prefs;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  column-gap: 40px;
  margin-top: 18px;
  border-top: 1px dashed var(--mpc-line);
}
.mpc__prefs:not([hidden]) { animation: mpc-unfold 240ms cubic-bezier(0.23, 1, 0.32, 1) both; }
@keyframes mpc-unfold {
  from { opacity: 0; clip-path: inset(0 0 100% 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}
.mpc__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--mpc-line);
}
.mpc__row-title { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.mpc__row-text { margin: 2px 0 0; color: var(--mpc-soft); font-size: .84rem; }
.mpc__fixed { color: var(--mpc-teal); font-size: .8rem; font-weight: 700; white-space: nowrap; }

.mpc__switch { position: relative; flex: none; width: 46px; height: 26px; cursor: pointer; }
.mpc__switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.mpc__switch span {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--mpc-ink);
  border-radius: 999px;
  background: #F2E9D8;
  transition: background-color .2s ease;
}
.mpc__switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--mpc-ink);
  transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1), background-color 200ms ease;
}
.mpc__switch input:checked + span { background: var(--mpc-amber); border-color: var(--mpc-amber); }
.mpc__switch input:checked + span::after { transform: translateX(20px); background: #fff; }
.mpc__switch input:focus-visible + span { outline: 2px solid var(--mpc-amber); outline-offset: 3px; }

.mpc__actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 8px 10px;
  align-self: center;
}
/* Aceptar y Rechazar comparten forma, color y tamaño (paridad AEPD). */
.mpc__btn {
  min-height: 46px;
  padding: 10px 18px;
  border: 1.5px solid var(--mpc-ink);
  border-radius: 999px;
  background: var(--mpc-ink);
  color: #FAF4E9;
  font: 700 .95rem/1 inherit;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
.mpc__btn:hover { background: var(--mpc-amber-deep); border-color: var(--mpc-amber-deep); }
.mpc__btn:active { transform: scale(.97); }
@media (hover: none) { .mpc__btn:hover { background: var(--mpc-ink); border-color: var(--mpc-ink); } }
.mpc__btn--save { grid-column: 1 / -1; }
.mpc__link {
  grid-column: 1 / -1;
  justify-self: center;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: var(--mpc-ink);
  font: 500 .88rem/1 inherit;
  font-family: inherit;
  text-decoration: underline;
  text-decoration-color: var(--mpc-kraft);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
}
.mpc__link:hover { text-decoration-color: var(--mpc-amber); }
.mpc__btn:focus-visible,
.mpc__link:focus-visible,
.mpc__text a:focus-visible { outline: 2px solid var(--mpc-amber); outline-offset: 3px; }

/* Botón "Configurar cookies" del pie. */
.mp-cookie-settings {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: inherit;
  text-decoration: underline;
  text-decoration-color: var(--mpc-kraft, #E0C7A0);
  text-underline-offset: 3px;
  cursor: pointer;
}

@media (max-width: 820px) {
  .mpc { left: 12px; right: 12px; bottom: 12px; }
  .mpc__slip {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "text" "prefs" "actions";
    padding: 24px 18px 14px;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }
  .mpc__title { font-size: 1.28rem; }
  .mpc__actions { margin-top: 16px; }
  .mpc__title { padding-right: 118px; }
  .mpc__stamp { top: 22px; right: 16px; }
  .mpc__tape { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mpc.is-entering .mpc__slip,
  .mpc.is-leaving .mpc__slip,
  .mpc__prefs:not([hidden]) { animation: none; }
  .mpc__switch span::after { transition: none; }
}

@media print { .mpc { display: none !important; } }
