/* ==========================================
   HESK Icons Fix - Invima Theme
   Corrección global de iconos para todo el sistema
   ========================================== */

/* FontAwesome Icons Fix */
.fas, .far, .fab, .fal, .fa {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.far {
    font-weight: 400 !important;
}

/* SVG Icons Fix */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    stroke-width: 0;
    stroke: currentColor;
    fill: currentColor;
    vertical-align: middle;
}

/* Fix para iconos específicos de HESK */
.tooltype .icon {
    width: 16px;
    height: 16px;
}

/* Fallback para iconos que no cargan */
.icon-info:before,
.fas.fa-info-circle:before {
    content: "ℹ️";
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 16px;
}

.icon-refresh:before,
.fas.fa-sync:before {
    content: "🔄";
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
}

.icon-chevron-right:before,
.fas.fa-chevron-right:before {
    content: "▶";
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 12px;
}

.icon-submit-ticket:before,
.fas.fa-ticket:before {
    content: "🎫";
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 16px;
}

/* Fix para el problema específico de empty div.tooltype */
.attach-tooltype .tooltype.right:empty:after {
    content: "ℹ️";
    font-size: 16px;
    color: #1776EA;
    display: inline-block;
}

/* Asegurar que SVG4Everybody funcione correctamente */
svg:not(:root) {
    overflow: hidden;
}

/* Debug mode - mostrar elementos que faltan iconos */
body.debug-icons .icon:empty:after {
    content: "❌";
    color: red;
    font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .icon {
        width: 1.2em;
        height: 1.2em;
    }
}

/* Modal simple para reemplazar jquery-modal */
.simple-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.simple-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: none;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.simple-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
}

.simple-modal-close:hover,
.simple-modal-close:focus {
    color: #000;
    text-decoration: none;
}

.simple-modal.show {
    display: block;
}
