/* Main Menu Widget Styles */

.main-menu {
    background: #000;
    border-bottom: 1px solid #000;
    padding: 8px 20px;
    font-family: Avenir Next, Noto Sans SC Bold, Noto Sans TC Bold, Noto Sans JP Bold, Noto Sans KR Bold, Tajawal ExtraBold, Arimo Bold, Kanit SemiBold, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 4px 8px;
    border: 1px solid transparent;
}

.menu-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    margin: 0 auto;
}

.menu-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-logo-container {
    position: relative;
    width: 32px;
    height: 32px;
}

.menu-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #111;
}

.menu-logo-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    text-transform: uppercase;
}

/* Контролы меню */
.menu-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* Селекторы */
.menu-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    color: white;
}

.menu-selector:hover {
    background-color: #333;
}

.menu-selector-icon {
    font-size: 14px;
    color: #ccc;
}

.menu-selector-code {
    font-size: 16px;
    font-weight: 500;
    color: white;
}

.menu-selector-arrow {
    font-size: 12px;
    color: #ccc;
    transition: transform 0.2s ease;
}

.menu-selector.active .menu-selector-arrow {
    transform: rotate(180deg);
}

.menu-divider {
    width: 1px;
    height: 16px;
    background-color: #757575;
    margin: 0 3px;
}

/* Модальные окна */
.menu-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.menu-modal.active {
    display: flex;
}

.menu-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

.menu-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-tab {
    cursor: pointer;
    padding: 5px 10px;
    
    transition: all 0.2s ease;
    color: #666;
    border-bottom: 2px solid transparent;
}

.modal-tab:hover {
    color: #333;
}

.modal-tab.active {
    color: #333;
    font-weight: 700;
    border-bottom: 2px solid #333;
}

.modal-divider {
    color: #ccc;
    font-weight: normal;
}

.menu-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.menu-modal-close:hover {
    background-color: #f5f5f5;
}

.menu-modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-list-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

.menu-list-item:hover {
    background-color: #f8f9fa;
}

.menu-list-item.selected {
    background-color: #e3f2fd;
}

.menu-list-item-code {
    font-weight: 600;
    color: #333;
    min-width: 60px;
    font-size: 14px;
}

.menu-list-item-names {
    flex: 1;
    margin-left: 15px;
}

.menu-list-item-native {
    font-size: 14px;
    color: #333;
    line-height: 1.3;
}

.menu-list-item-english {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
    margin-top: 2px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-menu {
        padding: 6px 15px;
    }
    
    .menu-controls {
        gap: 6px;
    }
    
    .menu-selector {
        padding: 3px 6px;
    }
    
    .menu-selector-code {
        font-size: 12px;
    }
    
    .menu-modal-content {
        width: 100%;
        height: 90vh;
        max-width: none;
        max-height: none;
        border-radius: 0;
        margin: 5vh 0;
    }
    
    .menu-modal-header {
        padding: 15px 20px;
    }
    
    .menu-modal-title {
        font-size: 16px;
    }
    
    .menu-modal-body {
        max-height: calc(90vh - 80px);
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-modal.active .menu-modal-content {
    animation: fadeIn 0.3s ease;
} 