/**
 * Texas IT & More - Enterprise Multilingual Switcher Stylesheet
 * Supports 7 Languages: English, Spanish, Farsi (RTL), Arabic (RTL), French, Russian, Chinese
 * Ultra-Compact Executive Glassmorphism & Complete Google Translate Shielding
 */

/* ==========================================================================
   1. Google Translate Core Shielding & Cleanup
   ========================================================================== */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
}

body {
    top: 0px !important;
    position: static !important;
}

.goog-text-highlight {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

#google_translate_element {
    display: none !important;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ==========================================================================
   2. Header Top Bar Inline Language Switcher
   ========================================================================== */
.texasit-topbar-lang {
    display: inline-flex;
    align-items: center;
    position: relative;
    margin-left: 10px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.texasit-topbar-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #d2d2d7;
    border-radius: 9999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.texasit-topbar-lang-btn:hover,
.texasit-topbar-lang-btn.active {
    border-color: #0071e3;
    color: #0071e3;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.18);
}

.texasit-lang-active-flag {
    font-size: 1rem;
    line-height: 1;
}

.texasit-lang-active-code {
    letter-spacing: 0.04em;
    font-weight: 700;
    font-size: 0.76rem;
}

.texasit-lang-chevron {
    transition: transform 0.25s ease;
    opacity: 0.6;
}

.texasit-topbar-lang-btn.active .texasit-lang-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* ==========================================================================
   3. Dropdown Menu (Compact High-Precision Glass Card)
   ========================================================================== */
.texasit-topbar-lang .texasit-lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    width: 195px;
    max-width: 210px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16), 0 3px 8px rgba(0, 0, 0, 0.05);
    padding: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(0.96);
    transform-origin: top right;
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.18s;
    pointer-events: none;
    z-index: 9999999 !important;
}

.texasit-topbar-lang .texasit-lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.texasit-lang-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px 6px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 3px;
}

.texasit-lang-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #86868b;
}

.texasit-lang-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: #0071e3;
    background: rgba(0, 113, 227, 0.08);
    padding: 1px 5px;
    border-radius: 9999px;
}

.texasit-lang-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.texasit-lang-item {
    margin: 0;
    padding: 0;
}

.texasit-lang-opt-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #1d1d1f;
    font-size: 0.80rem;
    font-weight: 500;
    transition: all 0.12s ease;
    text-align: left;
    outline: none;
    box-sizing: border-box;
}

.texasit-lang-opt-btn:hover {
    background: rgba(0, 113, 227, 0.08);
    color: #0071e3;
}

.texasit-lang-opt-btn.active {
    background: #0071e3;
    color: #ffffff;
    font-weight: 600;
}

.texasit-lang-opt-left {
    display: flex;
    align-items: center;
    gap: 7px;
}

.texasit-lang-opt-flag {
    font-size: 1rem;
    line-height: 1;
}

.texasit-lang-opt-name {
    font-size: 0.80rem;
    white-space: nowrap;
}

.texasit-lang-opt-code {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.04);
    color: #6e6e73;
}

.texasit-lang-opt-btn.active .texasit-lang-opt-code {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* ==========================================================================
   4. Permanent Positioning Guarantees for AI Chatbot & Audit Slide-In
   ========================================================================== */
#tit-launcher-btn {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    left: auto !important;
    z-index: 999999 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#tit-chat-window {
    position: fixed !important;
    bottom: 96px !important;
    right: 24px !important;
    left: auto !important;
    z-index: 999999 !important;
}

/* Diagnostic card stays strictly on bottom-left - zero overlap with chatbot */
.tit-audit-slidein {
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    right: auto !important;
    z-index: 99990 !important;
}

/* ==========================================================================
   5. RTL Styles for Farsi (Persian) & Arabic Support
   ========================================================================== */
html[lang="fa"] body,
html[lang="ar"] body,
html[dir="rtl"] body,
body.tit-lang-rtl {
    direction: rtl !important;
    text-align: right !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Vazirmatn", "IRANSans", "Noto Sans Arabic", Tahoma, sans-serif !important;
}

html[dir="rtl"] .texasit-topbar-lang .texasit-lang-dropdown {
    right: auto !important;
    left: 0 !important;
    transform-origin: top left !important;
}

html[dir="rtl"] .texas-header-cta {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

html[dir="rtl"] .texas-top-bar {
    direction: rtl !important;
}

html[dir="rtl"] .texasit-lang-opt-btn {
    text-align: right !important;
}

/* ==========================================================================
   6. Mobile Responsiveness
   ========================================================================== */
@media (max-width: 640px) {
    .texasit-topbar-lang {
        margin-left: 0;
    }
    
    #tit-launcher-btn {
        bottom: 16px !important;
        right: 16px !important;
    }
    
    #tit-chat-window {
        bottom: 84px !important;
        right: 16px !important;
    }
    
    .tit-audit-slidein {
        bottom: 16px !important;
        left: 16px !important;
    }
}
