/* Professional FontAwesome Fallback CSS
 * Provides clean text-based fallbacks when FontAwesome CDN fails to load
 * Compatible with FontAwesome 6.7.2
 * No emoji fallbacks - professional text and symbols only
 */

/* Base icon styles */
.fas, .fa, .far, .fal, .fat, .fad, .fab {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro', 'Font Awesome 5 Free', 'Font Awesome 5 Pro', sans-serif;
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block;
}

/* Brand icons */
.fab {
    font-family: 'Font Awesome 6 Brands', 'Font Awesome 5 Brands', sans-serif;
    font-weight: 400;
}

/* Regular icons */
.far {
    font-weight: 400;
}

/* Professional fallback styles when FontAwesome fails to load */
/* Only apply fallbacks when FontAwesome is not loaded */
@supports not (font-family: 'Font Awesome 6 Free') {
    .fas:before, .fa:before, .far:before, .fab:before {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
        font-size: 1em;
        font-weight: bold;
        display: inline-block;
        text-align: center;
        min-width: 1.2em;
        line-height: 1;
        vertical-align: baseline;
    }

    /* Professional text and symbol fallbacks for common icons */

    /* Navigation & UI */
    .fa-bars:before { content: '≡'; }
    .fa-times:before, .fa-times-circle:before, .fa-xmark:before { content: '×'; }
    .fa-plus:before { content: '+'; }
    .fa-minus:before { content: '−'; }
    .fa-search:before, .fa-magnifying-glass:before { content: '⌕'; }
    .fa-filter:before { content: '⚡'; }
    .fa-sort:before { content: '↕'; }
    .fa-list:before { content: '≡'; }
    .fa-th:before, .fa-grid:before { content: '⊞'; }
    .fa-table:before { content: '⊞'; }

    /* Actions */
    .fa-edit:before, .fa-pen:before, .fa-pencil:before { content: '✎'; }
    .fa-trash:before, .fa-trash-can:before { content: '×'; }
    .fa-save:before, .fa-floppy-disk:before { content: '💾'; }
    .fa-download:before { content: '↓'; }
    .fa-upload:before { content: '↑'; }
    .fa-copy:before { content: '⧉'; }
    .fa-print:before { content: '⎙'; }
    .fa-share:before { content: '⤴'; }
    .fa-external-link-alt:before, .fa-external-link:before { content: '⧉'; }

    /* Status & Feedback */
    .fa-check:before, .fa-check-circle:before { content: '✓'; }
    .fa-info-circle:before, .fa-info:before { content: 'i'; }
    .fa-exclamation-circle:before, .fa-exclamation:before { content: '!'; }
    .fa-question-circle:before, .fa-question:before { content: '?'; }
    .fa-bell:before { content: '◉'; }
    .fa-bell-slash:before { content: '⊘'; }

    /* Arrows & Directions */
    .fa-arrow-left:before { content: '←'; }
    .fa-arrow-right:before { content: '→'; }
    .fa-arrow-up:before { content: '↑'; }
    .fa-arrow-down:before { content: '↓'; }
    .fa-chevron-left:before { content: '‹'; }
    .fa-chevron-right:before { content: '›'; }
    .fa-chevron-up:before { content: '⌃'; }
    .fa-chevron-down:before { content: '⌄'; }

    /* User & People */
    .fa-user:before { content: '◉'; }
    .fa-users:before { content: '◉◉'; }
    .fa-user-circle:before { content: '◉'; }
    .fa-user-plus:before { content: 'U+'; }
    .fa-user-edit:before { content: 'U✎'; }

    /* Communication */
    .fa-envelope:before { content: '✉'; }
    .fa-phone:before { content: '☎'; }
    .fa-paper-plane:before { content: '✈'; }
    .fa-comment:before { content: '◐'; }
    .fa-comments:before { content: '◐◐'; }

    /* Files & Documents */
    .fa-file:before, .fa-file-alt:before { content: '□'; }
    .fa-file-pdf:before { content: 'PDF'; }
    .fa-file-upload:before { content: '↑'; }
    .fa-image:before { content: '□'; }
    .fa-images:before { content: '□□'; }
    .fa-video:before { content: '▶'; }
    .fa-music:before { content: '♪'; }

    /* Business & Industry */
    .fa-briefcase:before { content: '◼'; }
    .fa-industry:before { content: '⚒'; }
    .fa-building:before { content: '◼'; }
    .fa-cog:before, .fa-cogs:before, .fa-gear:before { content: '⚙'; }
    .fa-tools:before, .fa-wrench:before { content: '⚒'; }
    .fa-chart-line:before, .fa-chart-bar:before { content: '▤'; }
    .fa-dollar-sign:before { content: '$'; }
    .fa-tags:before { content: '◈'; }

    /* Location & Navigation */
    .fa-map-marker-alt:before, .fa-location-dot:before { content: '◉'; }
    .fa-globe:before, .fa-globe-asia:before { content: '◯'; }
    .fa-home:before, .fa-house:before { content: '⌂'; }

    /* Time & Calendar */
    .fa-calendar:before, .fa-calendar-alt:before { content: '▦'; }
    .fa-clock:before { content: '◷'; }

    /* Security */
    .fa-lock:before { content: '◼'; }
    .fa-unlock:before { content: '◻'; }
    .fa-shield-alt:before, .fa-shield:before { content: '◈'; }
    .fa-key:before { content: '⚿'; }
    .fa-sign-in-alt:before, .fa-sign-in:before { content: '→'; }
    .fa-sign-out-alt:before, .fa-sign-out:before { content: '←'; }

    /* Visibility */
    .fa-eye:before { content: '◉'; }
    .fa-eye-slash:before { content: '⊘'; }

    /* Media & Entertainment */
    .fa-star:before { content: '★'; }
    .fa-heart:before { content: '♥'; }
    .fa-trophy:before, .fa-award:before { content: '◈'; }
    .fa-rocket:before { content: '▲'; }
    .fa-graduation-cap:before { content: '◈'; }

    /* Business Operations */
    .fa-shipping-fast:before { content: '▶'; }
    .fa-handshake:before { content: '◐'; }
    .fa-lightbulb:before { content: '◉'; }

    /* System & Loading */
    .fa-spinner:before { content: '⟳'; }
    .fa-refresh:before, .fa-redo:before { content: '↻'; }
    .fa-undo:before { content: '↶'; }
    .fa-sync:before { content: '↻'; }

    /* Social Media Icons - Professional Text Fallbacks */
    .fa-facebook:before, .fa-facebook-f:before { content: 'FB'; font-size: 0.8em; font-weight: bold; }
    .fa-twitter:before { content: 'TW'; font-size: 0.8em; font-weight: bold; }
    .fa-linkedin:before, .fa-linkedin-in:before { content: 'IN'; font-size: 0.8em; font-weight: bold; }
    .fa-youtube:before { content: 'YT'; font-size: 0.8em; font-weight: bold; }
    .fa-instagram:before { content: 'IG'; font-size: 0.8em; font-weight: bold; }
    .fa-weixin:before { content: 'WX'; font-size: 0.8em; font-weight: bold; }

    /* Professional ID Card Icons */
    .fa-id-card:before { content: 'ID'; font-size: 0.8em; font-weight: bold; }
    .fa-address-card:before { content: 'ID'; font-size: 0.8em; font-weight: bold; }
}

/* End of @supports rule - FontAwesome fallbacks only apply when FontAwesome is not available */

/* Professional Animation Classes */
.fa-spin {
    animation: fa-spin 2s infinite linear;
}

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

.fa-pulse {
    animation: fa-pulse 1s infinite steps(8);
}

@keyframes fa-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Professional Size Classes */
.fa-xs { font-size: 0.75em; }
.fa-sm { font-size: 0.875em; }
.fa-lg { font-size: 1.33333em; line-height: 0.75em; vertical-align: -0.0667em; }
.fa-xl { font-size: 1.5em; line-height: 0.6667em; vertical-align: -0.075em; }
.fa-2x { font-size: 2em; }
.fa-3x { font-size: 3em; }
.fa-4x { font-size: 4em; }
.fa-5x { font-size: 5em; }
.fa-6x { font-size: 6em; }
.fa-7x { font-size: 7em; }
.fa-8x { font-size: 8em; }
.fa-9x { font-size: 9em; }
.fa-10x { font-size: 10em; }

/* Professional Margin Classes */
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }

/* Professional Color Classes */
.text-primary { color: #0d6efd !important; }
.text-secondary { color: #6c757d !important; }
.text-success { color: #198754 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: #0dcaf0 !important; }
.text-light { color: #f8f9fa !important; }
.text-dark { color: #212529 !important; }
.text-muted { color: #6c757d !important; }
.text-white { color: #ffffff !important; }

/* Professional opacity classes */
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }

/* Professional positioning */
.fa-fw { text-align: center; width: 1.25em; }

/* Ensure icons are properly aligned */
.fas, .far, .fab, .fa {
    vertical-align: baseline;
}

/* Professional hover effects for interactive icons */
.btn .fas, .btn .far, .btn .fab, .btn .fa,
a .fas, a .far, a .fab, a .fa {
    transition: all 0.2s ease-in-out;
}

.btn:hover .fas, .btn:hover .far, .btn:hover .fab, .btn:hover .fa,
a:hover .fas, a:hover .far, a:hover .fab, a:hover .fa {
    transform: scale(1.1);
}

/* Professional loading state */
.loading .fa-spinner {
    opacity: 0.7;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .fa-spin, .fa-pulse {
        animation: none;
    }
    
    .btn:hover .fas, .btn:hover .far, .btn:hover .fab, .btn:hover .fa,
    a:hover .fas, a:hover .far, a:hover .fab, a:hover .fa {
        transform: none;
    }
}

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

/* Print styles */
@media print {
    .fa-spin, .fa-pulse {
        animation: none;
    }
}