/* ============================================================================
   ISWHelp · Estilos del sistema de ayuda contextual iswPuertas
   Prefix isw-help- · border-radius 0 · respeta design system ISW
   ============================================================================ */

.isw-help-ico {
    display: inline-block;
    color: #5DADE2;
    margin-left: 6px;
    cursor: pointer;
    font-size: 12px;
    vertical-align: middle;
    transition: color .15s ease, transform .15s ease;
    user-select: none;
    line-height: 1;
}
.isw-help-ico:hover,
.isw-help-ico:focus {
    color: #2C1445;
    transform: scale(1.15);
    outline: none;
}
.isw-help-ico:focus-visible {
    outline: 2px solid #5DADE2;
    outline-offset: 2px;
}

/* Variante pequena para iconos dentro de cabeceras de tabla muy compactas */
th .isw-help-ico,
.isw-help-ico-sm {
    font-size: 11px;
    margin-left: 4px;
    color: rgba(255,255,255,0.7);
}
th .isw-help-ico:hover,
.isw-help-ico-sm:hover {
    color: #fff;
}

/* ----------------------------------------------------------------------------
   Popover (burbuja flotante)
   ---------------------------------------------------------------------------- */
.isw-help-popover {
    position: absolute;
    z-index: 2147483000;
    width: 320px;
    max-width: calc(100vw - 16px);
    background: #ffffff;
    border: 2px solid #2C1445;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: #222;
    animation: iswHelpFadeIn .12s ease-out;
}

@keyframes iswHelpFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.isw-help-pop-arrow {
    position: absolute;
    top: -8px;
    left: 16px;
    width: 0;
    height: 0;
    border-left:  8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #2C1445;
}

.isw-help-pop-head {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    gap: 6px;
}
.isw-help-pop-head i { font-size: 14px; }
.isw-help-pop-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.isw-help-pop-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    margin-left: 4px;
}
.isw-help-pop-close:hover { opacity: .7; }

.isw-help-pop-body {
    padding: 10px 14px 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Categorias · acentos de borde */
.isw-help-cat-info  { border-color: #3498db; }
.isw-help-cat-tip   { border-color: #27ae60; }
.isw-help-cat-warn  { border-color: #e67e22; }
.isw-help-cat-legal { border-color: #8e44ad; }

.isw-help-cat-info  .isw-help-pop-arrow { border-bottom-color: #3498db; }
.isw-help-cat-tip   .isw-help-pop-arrow { border-bottom-color: #27ae60; }
.isw-help-cat-warn  .isw-help-pop-arrow { border-bottom-color: #e67e22; }
.isw-help-cat-legal .isw-help-pop-arrow { border-bottom-color: #8e44ad; }

/* ----------------------------------------------------------------------------
   Responsive · tablet y movil
   ---------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .isw-help-popover {
        width: calc(100vw - 16px);
        max-width: 360px;
        font-size: 14px;
    }
    .isw-help-pop-head { font-size: 14px; }
    .isw-help-pop-body { padding: 12px 14px 14px; }
    .isw-help-ico { font-size: 14px; padding: 4px; }
}

@media (max-width: 480px) {
    .isw-help-popover {
        position: fixed !important;
        left: 8px !important;
        right: 8px !important;
        top: auto !important;
        bottom: 8px;
        width: auto;
        max-width: none;
    }
    .isw-help-pop-arrow { display: none; }
}

/* ----------------------------------------------------------------------------
   Print · ocultar siempre
   ---------------------------------------------------------------------------- */
@media print {
    .isw-help-ico,
    .isw-help-popover { display: none !important; }
}
