/* ============================================
   VENTANA EMERGENTE IFRAME  (v2)
   ============================================ */

.ifventana-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9998;
  display: none;
  backdrop-filter: blur(3px);
}
.ifventana-overlay.active { display: block; }

.ifventana-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  /* tamaño por defecto — se sobreescribe desde JS */
  width: 780px;
  max-width: 96vw;
  height: 520px;
  max-height: 92vh;
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
  z-index: 9999;
  display: none;
  overflow: hidden;
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0;
}
.ifventana-popup.active {
  display: flex;
  flex-direction: column;
  animation: ifvSlideIn 0.28s ease-out forwards;
}
@keyframes ifvSlideIn {
  from { opacity:0; transform:translate(-50%,-48%) scale(0.96); }
  to   { opacity:1; transform:translate(-50%,-50%) scale(1);    }
}

/* ── barra superior ── */
.ifventana-bar {
  flex-shrink: 0;
  height: 36px;
  background: #1a2e4a;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  user-select: none;
}
.ifventana-title {
  flex: 1;
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 11px;
  color: #b0d0e8;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ifventana-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: rgba(255,255,255,0.1);
  color: #cce0f0;
  border: none;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s;
  line-height: 1;
}
.ifventana-close:hover { background: rgba(255,80,80,0.55); color: white; }

/* ── iframe ── */
.ifventana-iframe {
  flex: 1;
  width: 100%;
  border: none;
  display: block;
}

/* ── enlace ── */
.ifventana-link {
  color: #B94A48 !important;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}
.ifventana-link:hover { color: #8B3634 !important; text-decoration: none; }

/* ── responsive ── */
@media (max-width: 600px) {
  .ifventana-popup { width: 98vw !important; height: 88vh !important; }
}
