/**
 * Footer WP — paridad visual con ReinoShellV2 (/dev/app).
 * Oculta footer.footer vacío del theme Juan.
 */

body.reino-kit-app-footer footer.footer {
  display: none !important;
}

html,
body.reino-kit-app-footer {
  min-height: 100%;
}

body.reino-kit-app-footer {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/*
 * Auth: el theme (.auth-page { overflow: hidden }) + body flex 100vh + footer
 * margin-top:auto pegan el footer al viewport y recortan el form. El isotipo
 * 154×178 ya no cabe: hay que scrollear.
 */
html:has(body.reino-kit-app-footer .auth-page),
html:has(body.reino-kit-app-footer .register-page),
html:has(body.reino-kit-app-footer .recover-password) {
  height: auto;
  min-height: 0;
  overflow: visible;
}

body.reino-kit-app-footer:has(.auth-page),
body.reino-kit-app-footer:has(.register-page),
body.reino-kit-app-footer:has(.recover-password) {
  display: block;
  height: auto;
  min-height: 0;
  overflow: visible;
}

body.reino-kit-app-footer:has(.auth-page) .reino-kit-site-footer-wrap,
body.reino-kit-app-footer:has(.register-page) .reino-kit-site-footer-wrap,
body.reino-kit-app-footer:has(.recover-password) .reino-kit-site-footer-wrap {
  margin-top: 2.5rem;
}

.reino-kit-site-footer-wrap {
  position: relative;
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
  font-family: "Source Sans 3", system-ui, -apple-system, sans-serif;
}

/* Anclado al border-top del <footer>. El theme pisa img { top/left/transform }. */
.reino-kit-site-footer > .reino-kit-site-footer__seal {
  pointer-events: none;
  position: absolute !important;
  left: 50% !important;
  top: 0 !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 10 !important;
  display: block !important;
  width: 54px !important;
  height: 54px !important;
  max-width: none !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  object-fit: contain;
}

@media (min-width: 640px) {
  .reino-kit-site-footer > .reino-kit-site-footer__seal {
    width: 60px !important;
    height: 60px !important;
  }
}

.reino-kit-site-footer {
  position: relative;
  border-top: 1px solid rgba(197, 160, 89, 0.12);
  color: #b5a896;
  font-size: 11px;
  /* Mitad del sello (54px) bajo la línea + aire para el copy apilado. */
  padding-top: calc(1.6875rem + 1.25rem);
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 640px) {
  .reino-kit-site-footer {
    padding-top: calc(1.875rem + 1.5rem);
  }
}

@media (min-width: 768px) {
  .reino-kit-site-footer {
    padding-top: calc(2.0625rem + 1.875rem);
    padding-bottom: 0.875rem;
  }
}

.reino-kit-site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .reino-kit-site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }
}

.reino-kit-site-footer__copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  margin: 0;
  text-align: center;
  color: #9a8b7a;
}

@media (min-width: 640px) {
  .reino-kit-site-footer__copy {
    justify-content: flex-start;
    text-align: left;
  }
}

.reino-kit-site-footer__dot {
  display: none;
  color: rgba(154, 139, 122, 0.7);
}

@media (min-width: 640px) {
  .reino-kit-site-footer__dot {
    display: inline;
  }
}

.reino-kit-site-footer a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 2px;
  transition: color 200ms ease;
}

.reino-kit-site-footer a:hover,
.reino-kit-site-footer a:focus-visible {
  color: #e8d4a8;
  text-decoration: underline;
}

.reino-kit-site-footer__ig {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.reino-kit-site-footer__ig img {
  width: 14px;
  height: 14px;
  opacity: 0.9;
  flex-shrink: 0;
}

.reino-kit-site-footer__partner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  color: #9a8b7a;
  letter-spacing: 0.04em;
  transition: opacity 200ms ease;
}

.reino-kit-site-footer__partner:hover,
.reino-kit-site-footer__partner:focus-visible {
  opacity: 0.9;
  text-decoration: none;
}

.reino-kit-site-footer__partner img {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  opacity: 0.9;
}
