/**
 * SSNF Universal Multi-Language Translator Styles
 * Luxury Design, Full Isolation, Zero Layout Shift
 */

/* ── Hide Google Translate Top Bar & Injected Elements (All Google Versions) ── */
.VIpgJd-ZVi9od-OR95ae-OWJJHd,
.VIpgJd-ZVi9od-OR95ae-OWJJHd-haAclf,
.VIpgJd-ZVi9od-l4eHX-hSRGPd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-aZ2wEe-OiiCO,
.VIpgJd-ZVi9od-SmMuJa,
.VIpgJd-ZVi9od-xl07Ob-OiiCO,
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
iframe.skiptranslate,
body > .skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    max-height: 0 !important;
    max-width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    z-index: -9999 !important;
}

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

html {
    margin-top: 0px !important;
}

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

.goog-te-gadget {
    color: transparent !important;
    font-size: 0 !important;
}

.goog-te-gadget .goog-te-combo {
    display: none !important;
}

/* ── Top Bar Language Trigger Button (Pill) ── */
.ssnf-lang-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #FFFFFF !important;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    user-select: none;
}

.ssnf-lang-pill:hover {
    background: #FF5500 !important;
    border-color: #FF5500 !important;
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 85, 0, 0.35);
}

.ssnf-lang-pill .lang-flag {
    font-size: 0.95rem;
    line-height: 1;
}

.ssnf-lang-pill .lang-name {
    letter-spacing: 0.2px;
}

.ssnf-lang-pill .lang-arrow {
    font-size: 0.65rem;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.ssnf-lang-pill:hover .lang-arrow {
    transform: rotate(180deg);
}

/* ── Dark Nav / Light Background Variants ── */
.ssnf-lang-pill-dark {
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    color: #1E293B !important;
}

.ssnf-lang-pill-dark:hover {
    background: #FF5500 !important;
    border-color: #FF5500 !important;
    color: #FFFFFF !important;
}

/* ── Floating Action Button (FAB) ── */
.ssnf-lang-fab {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1045;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF5500 0%, #D84315 100%);
    color: #FFFFFF !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 6px 18px rgba(255, 85, 0, 0.42);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
}

.ssnf-lang-fab:hover {
    transform: scale(1.1) rotate(12deg);
    box-shadow: 0 8px 24px rgba(255, 85, 0, 0.55);
    color: #FFFFFF !important;
}

.ssnf-lang-fab .fab-tooltip {
    position: absolute;
    left: 56px;
    background: #0F172A;
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(-6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.ssnf-lang-fab:hover .fab-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 576px) {
    .ssnf-lang-fab {
        bottom: 80px;
        left: 16px;
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
    }
}

/* ── Language Modal Styling ── */
#ssnfLangModal .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    background: #FFFFFF;
}

#ssnfLangModal .modal-header {
    background: linear-gradient(135deg, #0A192F 0%, #172A45 100%);
    color: #FFFFFF;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

#ssnfLangModal .modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FFFFFF;
}

#ssnfLangModal .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

#ssnfLangModal .modal-body {
    padding: 1.25rem 1.5rem 1.5rem;
    max-height: 75vh;
    overflow-y: auto;
}

/* ── Modal Search Box ── */
.ssnf-lang-search-wrap {
    position: relative;
    margin-bottom: 1rem;
}

.ssnf-lang-search-wrap i.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 1rem;
}

.ssnf-lang-search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    font-size: 0.9rem;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    background: #F8FAFC;
    color: #0F172A;
    transition: all 0.2s ease;
}

.ssnf-lang-search-input:focus {
    outline: none;
    border-color: #FF5500;
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(255, 85, 0, 0.12);
}

/* ── Popular Language Quick Chips ── */
.ssnf-quick-chips-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748B;
    margin-bottom: 0.5rem;
}

.ssnf-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1.25rem;
}

.ssnf-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 30px;
    background: #F1F5F9;
    color: #334155;
    border: 1px solid #E2E8F0;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}

.ssnf-chip-btn:hover {
    background: #FFE8DD;
    color: #FF5500;
    border-color: #FFBFA3;
    transform: translateY(-1px);
}

.ssnf-chip-btn.active {
    background: #FF5500;
    color: #FFFFFF;
    border-color: #FF5500;
    box-shadow: 0 3px 8px rgba(255, 85, 0, 0.3);
}

/* ── Category Headers ── */
.ssnf-lang-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0A192F;
    padding: 6px 0;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    border-bottom: 1.5px solid #F1F5F9;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Language Items Grid ── */
.ssnf-lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    margin-bottom: 1rem;
}

.ssnf-lang-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 10px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    text-align: left;
}

.ssnf-lang-card:hover {
    background: #FFFFFF;
    border-color: #FF5500;
    box-shadow: 0 4px 12px rgba(255, 85, 0, 0.15);
    transform: translateY(-1px);
}

.ssnf-lang-card.active {
    background: linear-gradient(135deg, #FFF5F0 0%, #FFE8DD 100%);
    border-color: #FF5500;
    box-shadow: 0 3px 10px rgba(255, 85, 0, 0.18);
}

.ssnf-lang-card .card-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.ssnf-lang-card .lang-flag-emoji {
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1;
}

.ssnf-lang-card .lang-text-wrap {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ssnf-lang-card .native-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1E293B;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ssnf-lang-card.active .native-name {
    color: #FF5500;
}

.ssnf-lang-card .english-name {
    font-size: 0.72rem;
    color: #64748B;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ssnf-lang-card .check-icon {
    color: #FF5500;
    font-size: 1rem;
    display: none;
}

.ssnf-lang-card.active .check-icon {
    display: inline-block;
}

/* ── No Results State ── */
.ssnf-lang-no-results {
    display: none;
    text-align: center;
    padding: 2rem 1rem;
    color: #94A3B8;
}

.ssnf-lang-no-results i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* ── Notification Toast ── */
.ssnf-lang-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1060;
    background: #0F172A;
    color: #FFFFFF;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.ssnf-lang-toast.show {
    opacity: 1;
    transform: translateY(0);
}
