/**
 * bf-info-panel.css — Panel ℹ de bloque estándar de bernal-fintech
 * Estándar obligatorio: docs/design/plugin-ui-standards.md §28.
 * Fuente canónica: wordpress/lib/ — copiar a plugins/<plugin>/css/ antes de deploy.
 */

/* ── Botón ℹ (SVG círculo+i) ─────────────────────────────────────────────── */
.cpg-info-btn {
    width: 22px; height: 22px; border-radius: 50%; border: none;
    background: transparent; color: var(--cpg-accent, #026580);
    cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; position: relative; transition: background 0.15s, color 0.15s;
}
.cpg-info-btn-icon { width: 100%; height: 100%; display: block; pointer-events: none; }
.cpg-info-btn:hover,
.cpg-info-btn[aria-expanded="true"] { background: var(--cpg-accent, #026580); color: #fff; }

/* En la home el JS mueve el ℹ al final del header del slot del theme (§3):
   el space-between del theme lo empuja al borde derecho del bloque */
.bft-slot-head .cpg-info-btn { position: static; align-self: center; flex: 0 0 auto; }
/* Con link «View full tool →» Y ℹ en el mismo head, space-between repartiría
   el link por el centro: margin auto agrupa link + ℹ a la derecha */
.bft-slot-head:has(.cpg-info-btn) .bft-slot-link { margin-left: auto; }

/* ── Panel overlay (cubre el bloque, NO empuja el contenido) ─────────────── */
.bf-info-panel {
    position: absolute; inset: 0; z-index: 30;
    overflow-y: auto;
    background: #f2f4f6; color: #444;
    border-radius: 6px;
    padding: 34px 20px 18px;
    font-family: 'Roboto', system-ui, sans-serif;
    font-size: 0.875rem; line-height: 1.7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 6px 20px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
    opacity: 0; visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}
.bf-info-panel.is-open { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) {
    .bf-info-panel { transition: none; }
}

.bf-info-close {
    position: absolute; top: 6px; right: 6px; z-index: 2;
    width: 28px; height: 28px; padding: 0;
    border: none; border-radius: 4px;
    background: transparent; color: #6c757d;
    font-size: 1.35rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.bf-info-close:hover { background: rgba(0, 0, 0, 0.07); color: #333; }

.bf-info-section + .bf-info-section { margin-top: 18px; }
.bf-info-section-title {
    font-weight: 600;
    color: var(--cpg-accent, #026580);
    margin: 0 0 6px;
    line-height: 1.4;
}
.bf-info-section-body p { margin: 0 0 10px; color: #444; }
.bf-info-section-body p:last-child { margin-bottom: 0; }
.bf-info-section-body ul { margin: 0; padding: 0 0 0 1.25em; list-style: disc; }
.bf-info-section-body li { margin-bottom: 8px; color: #444; }
.bf-info-section-body li:last-child { margin-bottom: 0; }
.bf-info-section-body li strong { color: #333; font-weight: 600; }
.bf-info-body.bf-info-plain { white-space: pre-line; }

@media (max-width: 767px) {
    .bf-info-panel { padding: 14px 16px 16px; }
    .bf-info-body { padding-top: 20px; }
}
