/* Multilingual Article Manager Frontend Styles */

.mam-language-switcher {
    margin: 10px 0;
    font-family: inherit;
}

/* Dropdown Style */
.mam-language-switcher.mam-style-dropdown {
    display: inline-block;
}

.mam-language-switcher.mam-style-dropdown select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
}

.mam-language-switcher.mam-style-dropdown select:hover {
    border-color: #999;
}

.mam-language-switcher.mam-style-dropdown select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* List Style */
.mam-language-switcher.mam-style-list .mam-language-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
    flex-wrap: wrap;
}

.mam-language-switcher.mam-style-list .mam-language-list li {
    margin: 0;
}

.mam-language-switcher.mam-style-list .mam-language-list a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    background: #f9f9f9;
    color: #333;
    font-size: 14px;
    transition: all 0.2s ease;
}

.mam-language-switcher.mam-style-list .mam-language-list a:hover {
    background: #e9e9e9;
    border-color: #999;
    text-decoration: none;
}

.mam-language-switcher.mam-style-list .mam-language-list li.active a {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.mam-language-switcher.mam-style-list .mam-language-list li.active a:hover {
    background: #135e96;
    border-color: #135e96;
}

/* RTL Support */
.mam-rtl {
    direction: rtl;
    text-align: right;
}

.mam-rtl .mam-language-switcher.mam-style-list .mam-language-list {
    justify-content: flex-start;
}

/* Translation Content Styling */
.mam-translated-content {
    line-height: 1.6;
}

.mam-translated-content.mam-rtl {
    direction: rtl;
    text-align: right;
}

/* Loading States */
.mam-loading {
    opacity: 0.6;
    pointer-events: none;
}

.mam-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: mam-spin 1s linear infinite;
}

@keyframes mam-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Language Indicator */
.mam-language-indicator {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .mam-language-switcher.mam-style-dropdown select {
        width: 100%;
        min-width: auto;
    }
    
    .mam-language-switcher.mam-style-list .mam-language-list {
        justify-content: center;
    }
    
    .mam-language-switcher.mam-style-list .mam-language-list a {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .mam-language-switcher.mam-style-list .mam-language-list {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mam-language-switcher.mam-style-list .mam-language-list a {
        text-align: center;
        margin-bottom: 5px;
    }
}

/* Print Styles */
@media print {
    .mam-language-switcher {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .mam-language-switcher.mam-style-list .mam-language-list a {
        border-width: 2px;
    }
    
    .mam-language-switcher.mam-style-dropdown select {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .mam-language-switcher.mam-style-list .mam-language-list a {
        transition: none;
    }
    
    .mam-loading::after {
        animation: none;
    }
}
