/* Language / country dropdown shared styles */

.tool-btn.lang-btn {
    width: auto;
    padding: 0 10px;
    gap: 4px;
}

.lang-dropdown {
    position: relative;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: auto;
    min-width: 180px;
    max-height: 70vh;
    overflow-y: auto;
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 9999;
    padding: 6px;
}

.lang-menu.active {
    display: block;
}

.lang-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, color 0.2s;
}

.lang-menu button:hover,
.lang-menu button.active {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-light);
}

.lang-menu button.active {
    border-left: 3px solid var(--accent-light);
    padding-left: 9px;
}

.lang-btn .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 14px;
    line-height: 1;
}

.lang-btn .btn-text {
    font-size: 12px;
    font-weight: 700;
    margin-left: 4px;
}

.dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.dropdown-label {
    flex: 1;
    line-height: 1.2;
}

@media (max-width: 1024px) {
    .lang-menu {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 60vh;
        border-radius: 16px 16px 0 0;
    }
}

@media (max-width: 768px) {
    .tool-btn.lang-btn {
        width: auto;
        min-width: 64px;
        height: 36px;
        padding: 4px 8px;
        gap: 4px;
        flex-shrink: 0;
        white-space: nowrap;
        overflow: hidden;
    }

    .lang-btn .btn-icon {
        width: 14px;
        height: 14px;
        font-size: 12px;
        flex-shrink: 0;
    }

    .lang-btn .btn-text {
        font-size: 11px;
        font-weight: 700;
        margin-left: 0;
        flex-shrink: 0;
    }
}

@media (max-width: 400px) {
    .tool-btn.lang-btn {
        min-width: 58px;
        padding: 4px 6px;
        gap: 3px;
    }

    .lang-btn .btn-icon {
        width: 13px;
        height: 13px;
        font-size: 11px;
    }

    .lang-btn .btn-text {
        font-size: 10px;
    }
}
