/**
 * Auto Translate - Language Switcher Styles
 */

/* Language Switcher Container */
.auto-translate-switcher {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Toggle Button */
.auto-translate-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.auto-translate-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #2d5a87 0%, #3d7ab7 100%);
}

.auto-translate-toggle:focus {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
}

/* Flag Icon */
.auto-translate-flag {
    font-size: 18px;
    line-height: 1;
}

/* Language Text */
.auto-translate-lang-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Arrow */
.auto-translate-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.auto-translate-switcher.open .auto-translate-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.auto-translate-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    min-width: 150px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.auto-translate-switcher.open .auto-translate-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Options */
.auto-translate-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #333333;
    text-align: left;
}

.auto-translate-option:hover {
    background: #f0f4f8;
}

.auto-translate-option:focus {
    outline: none;
    background: #e8f0fe;
}

.auto-translate-option.active {
    background: linear-gradient(135deg, #e8f4fd 0%, #d4e8f9 100%);
    color: #1e3a5f;
    font-weight: 600;
}

.auto-translate-option:first-child {
    border-radius: 12px 12px 0 0;
}

.auto-translate-option:last-child {
    border-radius: 0 0 12px 12px;
}

.auto-translate-option .auto-translate-flag {
    font-size: 20px;
}

/* Loading State */
.auto-translate-switcher.loading .auto-translate-toggle {
    pointer-events: none;
    opacity: 0.7;
}

.auto-translate-switcher.loading .auto-translate-flag {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Translated text indicator (optional subtle styling) */
[data-translated="true"] {
    /* No visible change, but marks translated elements */
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .auto-translate-switcher {
        bottom: 15px;
        left: 15px;
    }
    
    .auto-translate-toggle {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .auto-translate-flag {
        font-size: 16px;
    }
    
    .auto-translate-dropdown {
        min-width: 140px;
    }
    
    .auto-translate-option {
        padding: 10px 14px;
        font-size: 13px;
    }
}

