/* MiTinta Cookies — banner + modal */
.mitcookies[hidden] { display: none !important; }

.mitcookies {
  --mc-accent: #01B7E9;
  --mc-bg: #1e1e21;
  --mc-text: #ffffff;
  position: fixed;
  z-index: 99998;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}

/* ── Posiciones ── */
.mitcookies--bottom { left: 0; right: 0; bottom: 0; }
.mitcookies--bottom .mc-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 22px;
}
.mitcookies--box { left: 20px; bottom: 20px; max-width: 400px; }
.mitcookies--box .mc-banner {
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.mitcookies--box .mc-banner__actions { margin-top: 14px; }

.mc-banner {
  background: var(--mc-bg);
  color: var(--mc-text);
  box-shadow: 0 -2px 20px rgba(0, 0, 0, .25);
}
.mc-banner__body { flex: 1 1 340px; }
.mc-banner__title { font-size: 16px; font-weight: 700; margin: 0 0 4px; color: var(--mc-text); }
.mc-banner__text { margin: 0; color: var(--mc-text); }
.mc-link { color: var(--mc-accent); font-weight: 700; text-decoration: underline; }
.mc-link:hover { color: var(--mc-accent); opacity: .85; }

.mc-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── Botones ── */
.mc-btn {
  border: 0;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s ease, opacity .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.mc-btn:hover { transform: translateY(-1px); }
.mc-btn--accent { background: var(--mc-accent); color: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
.mc-btn--ghost {
  background: transparent;
  color: var(--mc-text);
  border: 1px solid rgba(255, 255, 255, .45);
}
.mc-btn--ghost:hover { border-color: var(--mc-accent); color: var(--mc-accent); }

/* ── Modal de preferencias ── */
.mc-modal[hidden] { display: none; }
.mc-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.mc-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.mc-modal__dialog {
  position: relative;
  background: #fff;
  color: #222;
  width: min(560px, 92vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}
.mc-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid #eceef1;
}
.mc-modal__head h3 { margin: 0; font-size: 19px; font-weight: 700; }
.mc-modal__close { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: #888; }
.mc-modal__close:hover { color: #222; }
.mc-modal__body { padding: 8px 22px; }
.mc-modal__foot {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end;
  padding: 16px 22px; border-top: 1px solid #eceef1;
}
.mc-modal__foot .mc-btn--ghost { color: #444; border-color: #cfd4da; }
.mc-modal__foot .mc-btn--ghost:hover { border-color: var(--mc-accent); color: var(--mc-accent); }

/* ── Categorías ── */
.mc-cat { padding: 16px 0; border-bottom: 1px solid #f0f2f4; }
.mc-cat:last-child { border-bottom: 0; }
.mc-cat__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.mc-cat__name { font-weight: 700; font-size: 15px; }
.mc-cat__always { font-size: 12px; font-weight: 700; color: var(--mc-accent); text-transform: uppercase; letter-spacing: .3px; }
.mc-cat__desc { margin: 0; font-size: 13px; color: #5a6472; line-height: 1.55; }

/* ── Interruptor ── */
.mc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.mc-switch input { opacity: 0; width: 0; height: 0; }
.mc-switch span {
  position: absolute; inset: 0; cursor: pointer;
  background: #cfd4da; border-radius: 26px; transition: background .2s ease;
}
.mc-switch span::before {
  content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s ease;
}
.mc-switch input:checked + span { background: var(--mc-accent); }
.mc-switch input:checked + span::before { transform: translateX(20px); }

/* ── Botón flotante para reabrir ── */
.mc-reopen {
  --mc-accent: #01B7E9;
  position: fixed; left: 18px; bottom: 18px; z-index: 99997;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  font-size: 22px; line-height: 1; padding: 0;
  transition: transform .12s ease;
}
.mc-reopen[hidden] { display: none; }
.mc-reopen:hover { transform: scale(1.08); }

@media (max-width: 640px) {
  .mitcookies--bottom .mc-banner { padding: 14px 16px; }
  .mc-banner__actions { width: 100%; }
  .mc-banner__actions .mc-btn { flex: 1 1 auto; }
  .mitcookies--box { left: 12px; right: 12px; max-width: none; }
}
