/**
 * Font Awesome Icon Fixes
 * 
 * Ensures Font Awesome icons display properly across all plugin components
 */

/* Ensure Font Awesome icons are properly loaded and displayed */
.fas, .far, .fab, .fa {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro", "FontAwesome" !important;
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.far {
    font-weight: 400;
}

.fab {
    font-weight: 400;
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
}

/* Fix for password toggle icons */
.retix-password-toggle .fas,
.retix-password-toggle .fa {
    font-size: 14px !important;
    color: #6c757d !important;
    /* No transition needed since hover color is the same */
}

.retix-password-toggle:hover .fas,
.retix-password-toggle:hover .fa {
    color: #6c757d !important;
}

/* Force override any potential conflicting styles */
button.retix-password-toggle:hover i.fas,
button.retix-password-toggle:hover i.fa,
.retix-password-toggle:hover i.fas.fa-eye,
.retix-password-toggle:hover i.fa.fa-eye {
    color: #6c757d !important;
}

/* Auth form icons */
.retix-auth-tab .fas,
.retix-auth-tab .fa {
    font-size: 14px;
    margin-right: 6px;
}

/* Dashboard navigation icons */
.retix-nav-item .fas,
.retix-nav-item .fa {
    font-size: 16px;
    width: 18px;
    text-align: center;
}

/* Button icons */
.retix-btn .fas,
.retix-btn .fa {
    margin-right: 6px;
    font-size: 0.9em;
}

/* Loading spinner animation */
.fa-spin {
    animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(359deg);
    }
}

/* Logout button icon */
.retix-logout-btn .fas,
.retix-logout-btn .fa {
    font-size: 12px;
    margin-right: 6px;
}

/* Form field icons */
.retix-form-field .fas,
.retix-form-field .fa {
    font-size: 14px;
    color: #6c757d;
}

/* Ticket form icons */
.retix-ticket-form .fas,
.retix-ticket-form .fa {
    margin-right: 8px;
    color: #495057;
}

/* Dashboard stat icons (if any) */
.retix-stat-item .fas,
.retix-stat-item .fa {
    font-size: 20px;
    margin-bottom: 8px;
    color: #007cba;
}

/* Modal close icons */
.retix-modal-close .fas,
.retix-modal-close .fa {
    font-size: 18px;
    color: #6c757d;
}

/* File upload icons */
.retix-file-upload .fas,
.retix-file-upload .fa {
    font-size: 24px;
    margin-bottom: 10px;
    color: #007cba;
}

/* Success/Error message icons */
.retix-success .fas,
.retix-success .fa {
    color: #28a745;
    margin-right: 8px;
}

.retix-error .fas,
.retix-error .fa {
    color: #dc3545;
    margin-right: 8px;
}

.retix-info .fas,
.retix-info .fa {
    color: #17a2b8;
    margin-right: 8px;
}

/* Ensure icons don't break in flexbox layouts */
.retix-nav-item,
.retix-btn,
.retix-auth-tab {
    align-items: center;
}

/* Fix for icons in mobile responsive layouts */
@media (max-width: 768px) {
    .retix-nav-item .fas,
    .retix-nav-item .fa {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .retix-auth-tab .fas,
    .retix-auth-tab .fa {
        font-size: 16px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .fas, .far, .fab, .fa {
        font-weight: 900 !important;
    }
}

/* Ensure visibility for all icon states */
.fas:before, 
.far:before, 
.fab:before, 
.fa:before {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}/* Force consistent eye icon color - Clear browser cache after this change */

/* Ultra-specific override for eye icon hover - highest priority */
.retix-auth-container .retix-password-toggle:hover i.fas.fa-eye,
.retix-form-field .retix-password-toggle:hover i.fas.fa-eye,
button[class*="retix-password-toggle"]:hover i[class*="fas"][class*="fa-eye"],
*[class*="retix-password-toggle"]:hover *[class*="fas"][class*="fa-eye"] {
    color: #6c757d !important;
    background: none !important;
    text-shadow: none !important;
}

/* Override theme button styles specifically for password toggle */
button.retix-password-toggle:hover,
button.retix-password-toggle:focus,
input[type="button"].retix-password-toggle:hover,
input[type="button"].retix-password-toggle:focus,
[type="button"].retix-password-toggle:hover,
[type="button"].retix-password-toggle:focus {
    background-color: transparent !important;
    background: none !important;
    color: #6c757d !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Force override theme's generic button hover styles */
.retix-password-toggle:hover,
.retix-password-toggle:focus,
.retix-password-toggle:active {
    background-color: transparent !important;
    background: none !important;
    color: #6c757d !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Ultra-specific override to defeat theme's [type=button]:hover rule */
button[type="button"].retix-password-toggle:focus,
button[type="button"].retix-password-toggle:hover,
[type="button"].retix-password-toggle:focus,
[type="button"].retix-password-toggle:hover,
button.retix-password-toggle:focus,
button.retix-password-toggle:hover {
    background-color: transparent !important;
    background: none !important;
    color: #6c757d !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
}

/* Password toggle positioning fixes for error states */
.retix-form-field.has-error .retix-password-toggle,
.retix-form-field .retix-password-field.has-error .retix-password-toggle,
.retix-password-field.retix-error .retix-password-toggle,
.retix-password-field.has-error .retix-password-toggle {
    position: absolute !important;
    top: 50% !important;
    right: 12px !important;
    transform: translateY(-50%) !important;
    z-index: 20 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: none !important;
    border: none !important;
    color: #6c757d !important;
}

/* Ensure eye icon stays visible in error states */
.retix-form-field.has-error .retix-password-toggle .fas,
.retix-form-field.has-error .retix-password-toggle .fa,
.retix-password-field.retix-error .retix-password-toggle .fas,
.retix-password-field.retix-error .retix-password-toggle .fa,
.retix-password-field.has-error .retix-password-toggle .fas,
.retix-password-field.has-error .retix-password-toggle .fa {
    color: #6c757d !important;
    font-size: 14px !important;
    z-index: 21 !important;
}
