/* =====================================================================
	 Google Translate Widget Customization
	 ---------------------------------------------------------------------
	 PURPOSE:
		 Provides styling for the Google Translate widget to ensure it
		 matches the site's design system and provides a good user experience.
		 Follows the Salt Lake City branding and accessibility standards.
	 ===================================================================== */

/* Google Translate Widget Container */
.google-translate-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

    .google-translate-container .translate-icon {
        color: var(--bs-primary);
        font-size: 1.25rem;
        flex-shrink: 0;
    }

/* Hide Google Translate branding and unnecessary elements */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0 !important;
}

.goog-te-gadget {
    font-family: 'Source Sans Pro', sans-serif !important;
    font-size: 0 !important;
}

/* Style the Google Translate dropdown */
.goog-te-gadget-simple {
    background-color: #fff !important;
    border: 2px solid var(--bs-primary) !important;
    border-radius: 4px !important;
    padding: 6px 10px !important;
    font-size: 14px !important;
    color: var(--bs-primary) !important;
    cursor: pointer !important;
    transition: background-color 0.2s, border-color 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

    .goog-te-gadget-simple:hover,
    .goog-te-gadget-simple:focus {
        background-color: var(--bs-primary-light) !important;
        border-color: var(--bs-primary-dark) !important;
    }

    .goog-te-gadget-simple:focus-visible,
    .goog-te-gadget-simple a:focus-visible {
        outline: 3px solid var(--bs-primary) !important;
        outline-offset: 2px !important;
    }

    /* Style the dropdown text */
    .goog-te-gadget-simple .goog-te-menu-value span {
        color: var(--bs-primary) !important;
        font-size: 14px !important;
        font-family: 'Source Sans Pro', sans-serif !important;
    }

    /* Hide "Powered by" text */
    .goog-te-gadget-simple .goog-te-gadget-icon {
        display: none !important;
    }

    /* Style the dropdown arrow */
    .goog-te-gadget-simple img {
        filter: none !important;
    }

/* Mobile responsive adjustments */
@media (max-width: 760px) {
    .google-translate-container {
        order: 2;
        margin-left: 0;
    }

    .goog-te-gadget-simple {
        font-size: 13px !important;
        padding: 5px 8px !important;
    }

    .google-translate-container .translate-icon {
        font-size: 1.1rem;
    }
}

/* Ultra small screen adjustments */
@media (max-width: 420px) {
    .goog-te-gadget-simple .goog-te-menu-value span {
        font-size: 13px !important;
    }
}

/* Ensure dropdown menu is visible */
.goog-te-menu-frame {
    z-index: 2000 !important;
}

/* Style for when a language is selected */
.goog-te-banner-frame {
    display: none !important;
}

html.translated-ltr {
    top: 0 !important;
}
