/* ============================================================================
 * GOOGLE TRANSLATE WIDGET - CUSTOM STYLING
 * ============================================================================
 * This file contains custom styles for the Google Translate widget
 * to match your website's theme.
 *
 * THEME COLORS (from your main-style.css):
 * --theme-main: #0A4E3C (Green)
 * --theme-secondary: #80C687 (Light Green)
 * --theme-tertiary: #FF6C31 (Orange)
 *
 * TO USE THIS FILE:
 * Add this line to protected/views/layouts/main.php (after line 16):
 * $this->registerCssFile("/css/google-translate-custom.css?v={$version}");
 *
 * OR include it in _googleTranslate.php if you prefer
 * ============================================================================
 */

/* ============================================================================
 * OPTION 1: MATCH YOUR SITE THEME (Green/Orange)
 * ============================================================================ */

/* Google Translate Widget Container */
.notranslate {
    display: inline-block;
    vertical-align: middle;
}

#language-menu {
    font-size: 0.8rem;
}

/* Main Dropdown Styling - Matches your theme */
.goog-te-gadget-simple {
    background-color: var(--theme-main, #0A4E3C) !important;
    border: 2px solid var(--theme-main, #0A4E3C) !important;
    border-radius: 4px !important;
    padding: 8px 15px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: #ffffff !important;
}

/* Hover Effect */
.goog-te-gadget-simple:hover {
    background-color: var(--theme-secondary, #80C687) !important;
    border-color: var(--theme-secondary, #80C687) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Text Color */
.goog-te-gadget-simple .goog-te-menu-value span {
    color: #ffffff !important;
}

/* Dropdown Arrow */
.goog-te-gadget-simple .goog-te-menu-value span:last-child {
    color: #ffffff !important;
}

/* ============================================================================
 * OPTION 2: CLEAN WHITE STYLE (Alternative)
 * ============================================================================
 * Uncomment this section if you prefer a clean white dropdown
 */

/*
.goog-te-gadget-simple {
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 8px 15px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.goog-te-gadget-simple:hover {
    border-color: var(--theme-main, #0A4E3C) !important;
    background-color: #f5f5f5 !important;
}

.goog-te-gadget-simple .goog-te-menu-value span {
    color: #333 !important;
}
*/

/* ============================================================================
 * REMOVE GOOGLE BRANDING
 * ============================================================================ */

/* Hide "Powered by Google" text */
.goog-te-gadget-simple .goog-te-menu-value span:first-child {
    display: none;
}

/* Hide Google Translate logo */
.goog-te-gadget-icon {
    display: none !important;
}

/* Remove top banner frame */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

/* Prevent body from being pushed down */
body {
    top: 0px !important;
    position: static !important;
}

/* ============================================================================
 * MOBILE RESPONSIVE STYLING
 * ============================================================================ */

@media (max-width: 768px) {
    .notranslate {
        display: inline-block;
    }

    .goog-te-gadget-simple {
        padding: 6px 12px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .notranslate {
        width: auto;
    }

    .goog-te-gadget-simple {
        padding: 5px 10px !important;
        font-size: 12px !important;
    }
}

/* ============================================================================
 * DROPDOWN MENU STYLING
 * ============================================================================ */

/* Style the dropdown menu that appears when clicked */
.goog-te-menu-frame {
    border: 1px solid var(--theme-main, #0A4E3C) !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Style individual language options */
.goog-te-menu2-item div,
.goog-te-menu2-item:link div,
.goog-te-menu2-item:visited div,
.goog-te-menu2-item:active div {
    color: #333 !important;
    padding: 8px 12px !important;
}

/* Hover effect on language options */
.goog-te-menu2-item:hover div {
    background-color: var(--theme-secondary, #80C687) !important;
    color: #ffffff !important;
}

/* Selected language */
.goog-te-menu2-item-selected div {
    background-color: var(--theme-main, #0A4E3C) !important;
    color: #ffffff !important;
}

/* ============================================================================
 * INTEGRATION WITH EXISTING LANGUAGE BUTTONS
 * ============================================================================ */

/* Make Google Translate widget align with your existing lang-btn */
.notranslate {
    display: inline-flex;
    align-items: center;
    height: 100%;
}

/* Match the height of your existing language buttons */
.goog-te-gadget-simple {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================================
 * CUSTOM ICON (Optional)
 * ============================================================================
 * Add a custom globe icon before the dropdown
 */

/*.notranslate::before {*/
/*    content: "🌐";*/
/*    margin-right: 5px;*/
/*    font-size: 16px;*/
/*}*/

/* Or use a custom image icon */
/*
.notranslate::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    background-image: url('/images/globe-icon.png');
    background-size: contain;
    background-repeat: no-repeat;
}
*/

/* ============================================================================
 * ACCESSIBILITY IMPROVEMENTS
 * ============================================================================ */

/* Focus state for keyboard navigation */
.goog-te-gadget-simple:focus {
    outline: 2px solid var(--theme-tertiary, #FF6C31) !important;
    outline-offset: 2px;
}

/* Improve contrast for better readability */
.goog-te-menu-value span {
    font-weight: 500;
}

/* Loading animation removed - widget will show when ready */

/* ============================================================================
 * END OF CUSTOM STYLING
 * ============================================================================ */
