/* Styles pour le système i18n */

/* Sélecteurs de langue et devise */
.kb-language-selector,
.kb-currency-selector {
    display: inline-block;
    margin: 0 10px;
}

.kb-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kb-select:hover {
    border-color: #2271b1;
}

.kb-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Widget dans le header */
.kb-i18n-widget {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
}

/* Barre de sélection flottante */
.kb-i18n-bar {
    position: fixed;
    top: 32px;
    right: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 9999;
    display: flex;
    gap: 15px;
    align-items: center;
}

.kb-i18n-bar.admin-bar {
    top: 46px;
}

.kb-i18n-label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
}

/* Animation de changement */
.kb-price-converting {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

/* Indicateur de conversion */
.kb-conversion-indicator {
    display: inline-block;
    margin-left: 5px;
    font-size: 11px;
    color: #666;
    font-style: italic;
}

/* Support RTL pour l'arabe */
html[dir="rtl"] .kb-i18n-bar {
    right: auto;
    left: 20px;
}

html[dir="rtl"] .kb-select {
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .kb-i18n-bar {
        top: 10px;
        right: 10px;
        padding: 10px;
        flex-direction: column;
        gap: 10px;
    }
    
    .kb-select {
        width: 100%;
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Dropdown amélioré */
.kb-i18n-dropdown {
    position: relative;
    display: inline-block;
}

.kb-i18n-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kb-i18n-dropdown-toggle:hover {
    border-color: #2271b1;
    background: #f8f9fa;
}

.kb-i18n-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 180px;
    display: none;
    z-index: 1000;
}

.kb-i18n-dropdown-menu.active {
    display: block;
}

.kb-i18n-dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kb-i18n-dropdown-item:hover {
    background: #f8f9fa;
}

.kb-i18n-dropdown-item.selected {
    background: #e7f3ff;
    color: #2271b1;
    font-weight: 600;
}

.kb-i18n-flag {
    font-size: 18px;
}

/* Notification de changement */
.kb-i18n-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2271b1;
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.kb-i18n-notification.success {
    background: #00a32a;
}

.kb-i18n-notification.error {
    background: #d63638;
}
