/* Movich Hotels Consent Manager - Compact UI v1.1 */

:root {
  --movich-gold: #86754D;
  --movich-gold-dark: #6f613f;
  --movich-text: #1f1f1f;
  --movich-muted: #686868;
  --movich-bg: #ffffff;
  --movich-soft: #f6f4ef;
  --movich-border: #e6e1d6;
  --movich-radius: 14px;
  --movich-shadow: 0 12px 35px rgba(0, 0, 0, 0.16);
}

/* ==============================
   BASE
   ============================== */

.movich-consent-banner,
.movich-consent-modal,
.movich-consent-reopen {
  font-family: "Trebuchet MS", Arial, sans-serif;
  box-sizing: border-box;
}

.movich-consent-banner *,
.movich-consent-modal * {
  box-sizing: border-box;
}

/* ==============================
   BANNER DESKTOP COMPACTO
   ============================== */

.movich-consent-banner {
  position: fixed;

  right: 20px;
  bottom: 20px;
  left: auto;

  width: 410px;
  max-width: calc(100vw - 40px);

  z-index: 2147483000;

  background: var(--movich-bg);
  color: var(--movich-text);

  border: 1px solid var(--movich-border);
  border-radius: var(--movich-radius);

  box-shadow: var(--movich-shadow);

  overflow: hidden;
}

.movich-consent-banner__content {
  padding: 17px 18px 16px;

  display: flex;
  flex-direction: column;

  align-items: stretch;

  gap: 13px;
}

.movich-consent-banner__copy {
  width: 100%;
}

.movich-consent-banner h2 {
  margin: 0 0 6px;

  font-size: 17px;
  line-height: 1.25;

  font-weight: 700;

  color: var(--movich-text);
}

.movich-consent-banner p {
  margin: 0;

  font-size: 12.5px;
  line-height: 1.45;

  color: var(--movich-muted);
}

.movich-consent-banner__actions {
  display: flex;

  justify-content: flex-end;
  align-items: center;

  gap: 7px;

  flex-wrap: wrap;
}

/* ==============================
   BOTONES
   ============================== */

.movich-btn {
  appearance: none;

  border: 1px solid transparent;

  border-radius: 8px;

  padding: 8px 11px;

  min-height: 35px;

  font: inherit;

  font-size: 12px;
  line-height: 1;

  font-weight: 700;

  cursor: pointer;

  transition:
    transform 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease,
    opacity 0.12s ease;
}

.movich-btn:hover {
  transform: translateY(-1px);
}

.movich-btn:focus-visible,
.movich-consent-reopen:focus-visible,
.movich-consent-modal__x:focus-visible {
  outline: 3px solid rgba(134, 117, 77, 0.25);
  outline-offset: 2px;
}

/* ACEPTAR */

.movich-btn--primary {
  background: var(--movich-gold);
  color: #ffffff;
}

.movich-btn--primary:hover {
  background: var(--movich-gold-dark);
}

/* RECHAZAR */

.movich-btn--secondary {
  background: #ffffff;

  border-color: var(--movich-gold);

  color: var(--movich-gold);
}

/* CONFIGURAR */

.movich-btn--ghost {
  background: var(--movich-soft);

  color: var(--movich-text);

  border-color: transparent;
}

/* ==============================
   MODAL
   ============================== */

.movich-consent-modal {
  position: fixed;

  inset: 0;

  z-index: 2147483001;

  display: none;
}

.movich-consent-modal.is-open {
  display: block;
}

.movich-consent-modal__backdrop {
  position: absolute;

  inset: 0;

  background: rgba(0, 0, 0, 0.44);

  backdrop-filter: blur(2px);
}

.movich-consent-modal__panel {
  position: relative;

  width: min(560px, calc(100% - 32px));

  max-height: calc(100vh - 48px);

  overflow-y: auto;

  margin: 24px auto;

  padding: 25px;

  background: #ffffff;

  border-radius: 16px;

  box-shadow: var(--movich-shadow);
}

.movich-consent-modal h2 {
  margin: 0 0 8px;

  font-size: 20px;
  line-height: 1.25;

  font-weight: 700;
}

.movich-consent-modal p {
  margin: 0;

  font-size: 13px;
  line-height: 1.5;

  color: var(--movich-muted);
}

.movich-consent-modal__intro {
  padding-right: 40px;

  margin-bottom: 16px !important;
}

.movich-consent-modal__x {
  position: absolute;

  top: 13px;
  right: 13px;

  width: 36px;
  height: 36px;

  border: 0;

  border-radius: 50%;

  background: var(--movich-soft);

  color: var(--movich-text);

  font-size: 23px;
  line-height: 1;

  cursor: pointer;
}

/* ==============================
   OPCIONES
   ============================== */

.movich-consent-option {
  position: relative;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 18px;

  padding: 16px 0;

  border-top: 1px solid var(--movich-border);
}

.movich-consent-option strong {
  display: block;

  margin-bottom: 4px;

  font-size: 14px;

  color: var(--movich-text);
}

.movich-consent-option p {
  max-width: 420px;

  font-size: 12.5px;
}

.movich-consent-always {
  white-space: nowrap;

  font-size: 11px;

  font-weight: 700;

  color: var(--movich-gold);
}

/* ==============================
   SWITCHES
   ============================== */

.movich-consent-option input {
  position: absolute;

  opacity: 0;

  pointer-events: none;
}

.movich-consent-switch {
  position: relative;

  flex: 0 0 44px;

  width: 44px;
  height: 24px;

  border-radius: 999px;

  background: #cacaca;

  cursor: pointer;

  transition: background 0.2s ease;
}

.movich-consent-switch::after {
  content: "";

  position: absolute;

  width: 18px;
  height: 18px;

  top: 3px;
  left: 3px;

  border-radius: 50%;

  background: #ffffff;

  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);

  transition: transform 0.2s ease;
}

.movich-consent-option input:checked + .movich-consent-switch {
  background: var(--movich-gold);
}

.movich-consent-option input:checked + .movich-consent-switch::after {
  transform: translateX(20px);
}

.movich-consent-option input:focus-visible + .movich-consent-switch {
  outline: 3px solid rgba(134, 117, 77, 0.25);
  outline-offset: 2px;
}

/* ==============================
   BOTONES DEL MODAL
   ============================== */

.movich-consent-modal__actions {
  display: flex;

  justify-content: flex-end;

  gap: 8px;

  padding-top: 16px;

  border-top: 1px solid var(--movich-border);
}

/* ==============================
   BOTON FLOTANTE REABRIR
   ============================== */

.movich-consent-reopen {
  position: fixed;

  left: 18px;
  bottom: 18px;

  z-index: 2147482999;

  width: 42px;
  height: 42px;

  border: 1px solid var(--movich-border);

  border-radius: 50%;

  background: #ffffff;

  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.14);

  cursor: pointer;

  font-size: 18px;
}

.movich-consent-banner ~ .movich-consent-reopen {
  display: none;
}

/* Evitar scroll con modal abierto */

html.movich-consent-open {
  overflow: hidden;
}

/* ==============================
   TABLET / MOBILE
   ============================== */

@media (max-width: 820px) {

  .movich-consent-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;

    width: auto;

    max-width: none;
  }

  .movich-consent-banner__content {
    padding: 17px;
  }

  .movich-consent-banner h2 {
    font-size: 17px;
  }

  .movich-consent-banner p {
    font-size: 13px;
    line-height: 1.5;
  }

  .movich-consent-banner__copy {
    margin-bottom: 2px;
  }

  .movich-consent-banner__actions {
    display: grid;

    grid-template-columns: 1fr;

    gap: 8px;
  }

  .movich-btn {
    width: 100%;

    min-height: 40px;

    padding: 10px 14px;

    font-size: 13px;
  }

  .movich-consent-modal__panel {
    width: calc(100% - 20px);

    margin: 10px auto;

    max-height: calc(100vh - 20px);

    padding: 22px 18px;
  }

  .movich-consent-modal h2 {
    font-size: 19px;
  }

  .movich-consent-option {
    align-items: flex-start;

    padding: 15px 0;
  }

  .movich-consent-always {
    white-space: normal;

    text-align: right;
  }

  .movich-consent-modal__actions {
    display: grid;

    grid-template-columns: 1fr;

    gap: 8px;
  }

  .movich-consent-reopen {
    left: 12px;
    bottom: 12px;
  }
}

/* ==============================
   MOBILE PEQUEÑO
   ============================== */

@media (max-width: 430px) {

  .movich-consent-banner {
    border-radius: 12px;
  }

  .movich-consent-banner__content {
    padding: 15px;
  }

  .movich-consent-banner h2 {
    font-size: 16px;
  }

  .movich-consent-banner p {
    font-size: 12.5px;
  }

  .movich-consent-modal__panel {
    padding: 20px 16px;
  }
}

/* ==============================
   ACCESIBILIDAD
   ============================== */

@media (prefers-reduced-motion: reduce) {

  .movich-btn,
  .movich-consent-switch,
  .movich-consent-switch::after {
    transition: none;
  }
}
/* Enlace opcional a la politica y personalizaciones administrativas */
.movich-consent-privacy-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--movich-gold);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.movich-consent-privacy-link:hover { color: var(--movich-gold-dark); }
.movich-consent-privacy-link:focus-visible {
  outline: 3px solid rgba(134, 117, 77, .25);
  outline-offset: 2px;
}
