.uf-club-modal-open,
.uf-club-modal-open body {
  overflow: hidden;
}

/* Los popovers de Bootstrap se insertan directamente en body. Si el enlace
   que abre el modal conserva hover/focus, el popover puede quedar por encima. */
.uf-club-modal-open .popover,
.uf-club-modal-open .tooltip {
  display: none !important;
}

.uf-club-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
  background: rgba(0, 0, 0, .86);
  opacity: 0;
  transition: opacity 440ms ease-out;
}

.uf-club-modal-overlay.is-visible {
  opacity: 1;
}

.uf-club-modal-panel {
  position: relative;
  box-sizing: border-box;
  width: 96vw;
  height: 94vh;
  background: #071521;
  border: 14px solid #fff;
  border-radius: 6px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, .72);
  opacity: .3;
  transform: scale(.08);
  transform-origin: var(--uf-modal-origin-x, 100%) var(--uf-modal-origin-y, 0);
  transition:
    transform 860ms cubic-bezier(.18, .86, .28, 1),
    opacity 440ms ease-out;
}

.uf-club-modal-overlay.is-visible .uf-club-modal-panel {
  opacity: 1;
  transform: scale(1);
}

.uf-club-modal-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #071521;
}

.uf-club-modal-close {
  position: absolute;
  z-index: 2;
  top: -25px;
  right: -25px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #071521;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .85);
  font: 700 27px/30px Arial, sans-serif;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.uf-club-modal-close:hover,
.uf-club-modal-close:focus {
  color: #fff;
  border-color: #fff;
  transform: scale(1.08);
}

.uf-club-modal-close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 800px) {
  .uf-club-modal-overlay { padding: 1vh 1vw; }
  .uf-club-modal-panel { width: 98vw; height: 97vh; border-width: 8px; }
  .uf-club-modal-close {
    top: 6px;
    right: 6px;
    width: 44px;
    height: 44px;
    font-size: 30px;
    line-height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .uf-club-modal-overlay,
  .uf-club-modal-panel,
  .uf-club-modal-close {
    transition: none;
  }
}
