/* Page Translator Widget */
#page-translator-widget {
    position: fixed;
    top: 80px;  
    right: 30px;
    z-index: 9997;
}

.translator-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.translator-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.translator-toggle .flag {
    font-size: 20px;
}

.translator-toggle .lang-code {
    font-size: 14px;
    letter-spacing: 1px;
}

.translator-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.translator-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.translator-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.translator-header h4 {
    margin: 0;
    font-size: 1.1em;
}

.translator-search {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.translator-search input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.translator-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.language-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 15px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    margin-bottom: 5px;
}

.language-option:hover {
    background: rgba(102, 126, 234, 0.1);
}

.language-option.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    font-weight: 600;
}

.language-option .flag {
    font-size: 24px;
}

.language-option .lang-name {
    font-size: 15px;
    color: #333;
}

.translator-footer {
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    background: #f9f9f9;
    border-radius: 0 0 15px 15px;
}

.translator-footer small {
    color: #999;
    font-size: 12px;
}

/* Translation Overlay */
.translation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.translation-overlay.show {
    opacity: 1;
    visibility: visible;
}

.translation-spinner {
    text-align: center;
    color: white;
}

.translation-spinner .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.translation-spinner p {
    font-size: 1.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

.translation-spinner small {
    font-size: 0.9em;
    opacity: 0.8;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar for language list */
.language-list::-webkit-scrollbar {
    width: 8px;
}

.language-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.language-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.language-list::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

