/* ==========================================================================
   DGtalQr Multi-Language System (Default English, Compact Footer-Only UI,
   Static UI Translation Only)
   NEW STANDALONE FILE - Does not modify any existing stylesheets
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&display=swap');

/* Universal Multi-Script Font Fallback to prevent missing glyph boxes (tofu) */
html[lang]:not([lang="en"]) body {
    font-family: 'Plus Jakarta Sans', 'Inter', 'Noto Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hide any third-party translation top bars/popups */
.goog-te-banner-frame,
.skiptranslate > iframe,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

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

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

/* Automatic RTL Layout Support for Arabic (ar) and Urdu (ur) */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .footer__inner,
html[dir="rtl"] .header-container,
html[dir="rtl"] .navbar .container {
    direction: rtl;
}

/* ==========================================================================
   Ultra-Compact Footer Language Pill (Inline inside .footer__bottom)
   Takes minimal space (~30px height) with sleek glassmorphic UI
   ========================================================================== */
.dgtal-footer-lang-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    box-sizing: border-box;
    font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: #f8fafc;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    direction: ltr !important;
    text-align: left !important;
    max-width: 100%;
    flex-wrap: nowrap;
}

.dgtal-footer-lang-wrapper:hover,
.dgtal-footer-lang-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 106, 0, 0.55);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.dgtal-footer-globe-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11.5px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(255, 106, 0, 0.35);
}

.dgtal-footer-globe-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(255, 106, 0, 0.5);
}

.dgtal-footer-select {
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-size: 11.5px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    padding: 2px 2px;
    line-height: 1.2;
    text-overflow: ellipsis;
}

.dgtal-footer-select:hover,
.dgtal-footer-select:focus {
    color: #ffffff;
}

.dgtal-footer-select--region {
    max-width: 135px;
    color: #cbd5e1;
}

.dgtal-footer-select--lang {
    max-width: 115px;
    color: #ffffff;
    font-weight: 700;
}

.dgtal-footer-select option,
.dgtal-footer-select optgroup {
    background: #0f172a;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 500;
}

.dgtal-footer-divider {
    width: 1px;
    height: 13px;
    background: rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

.dgtal-footer-reset-btn {
    background: rgba(255, 106, 0, 0.2);
    border: 1px solid rgba(255, 106, 0, 0.5);
    color: #ff984f;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.3;
    flex-shrink: 0;
}

.dgtal-footer-reset-btn:hover {
    background: #ff6a00;
    color: #ffffff;
    border-color: #ff6a00;
}

/* ==========================================================================
   Compact Searchable Country, State & Language Explorer Modal
   ========================================================================== */
.dgtal-lang-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999999;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    direction: ltr !important;
    text-align: left !important;
}

.dgtal-lang-modal-overlay.open {
    display: flex;
}

.dgtal-lang-modal {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    max-width: 680px;
    width: 100%;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    color: #f8fafc;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    font-family: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
}

.dgtal-lang-modal-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(30, 41, 59, 0.65);
}

.dgtal-lang-modal-header h3 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 7px;
}

.dgtal-lang-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #cbd5e1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dgtal-lang-modal-close:hover {
    background: #ef4444;
    color: #ffffff;
}

.dgtal-lang-modal-search {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    background: #1e293b;
}

.dgtal-lang-search-input {
    flex: 1;
    min-width: 180px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 7px 11px;
    color: #ffffff;
    font-size: 12.5px;
    outline: none;
}

.dgtal-lang-search-input:focus {
    border-color: #ff6a00;
}

.dgtal-lang-modal-body {
    padding: 12px 16px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 8px;
}

.dgtal-lang-card {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 11px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dgtal-lang-card:hover {
    border-color: #ff6a00;
    background: rgba(255, 106, 0, 0.12);
    transform: translateY(-1px);
}

.dgtal-lang-card.active {
    border-color: #ff6a00;
    background: linear-gradient(135deg, rgba(255, 106, 0, 0.22) 0%, rgba(238, 9, 121, 0.18) 100%);
}

.dgtal-lang-card-region {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.dgtal-lang-card-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
}

.dgtal-lang-card-native {
    font-size: 11px;
    color: #ff8533;
    font-weight: 600;
}

@media (max-width: 640px) {
    .dgtal-footer-lang-wrapper {
        padding: 3px 8px 3px 4px;
        gap: 5px;
    }

    .dgtal-footer-select--region {
        max-width: 110px;
        font-size: 11px;
    }

    .dgtal-footer-select--lang {
        max-width: 98px;
        font-size: 11px;
    }
}
